summaryrefslogtreecommitdiffstats
path: root/todolists
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2013-02-09 23:43:40 +0100
committerDan McGee <dan@archlinux.org>2013-02-09 23:50:45 +0100
commit5566d43a7734f6bb2f48d5d511351da12ddc5cc1 (patch)
treed575d2c100a039100771fdc9ed056d33da23b6c3 /todolists
parent8524a6057c4b99a620850494a22eb3d1f56bee68 (diff)
downloadarchweb-5566d43a7734f6bb2f48d5d511351da12ddc5cc1.tar.gz
archweb-5566d43a7734f6bb2f48d5d511351da12ddc5cc1.tar.xz
Use 'update_fields' model.save() kwarg
This was added in Django 1.5 and allows saving only a subset of a model's fields. It makes sense in a few cases to utilize it. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'todolists')
-rw-r--r--todolists/views.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/todolists/views.py b/todolists/views.py
index f333728..9935987 100644
--- a/todolists/views.py
+++ b/todolists/views.py
@@ -47,7 +47,7 @@ def flag(request, slug, pkg_id):
else:
tlpkg.status = TodolistPackage.INCOMPLETE
tlpkg.user = request.user
- tlpkg.save()
+ tlpkg.save(update_fields=('status', 'user', 'last_modified'))
if request.is_ajax():
data = {
'status': tlpkg.get_status_display(),