summaryrefslogtreecommitdiffstats
path: root/releng
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 /releng
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 'releng')
-rw-r--r--releng/management/commands/syncisos.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/releng/management/commands/syncisos.py b/releng/management/commands/syncisos.py
index 223c771..c9f6196 100644
--- a/releng/management/commands/syncisos.py
+++ b/releng/management/commands/syncisos.py
@@ -53,7 +53,7 @@ class Command(BaseCommand):
if not existing.active:
existing.active = True
existing.removed = None
- existing.save()
+ existing.save(update_fields=('active', 'removed'))
# and then mark all other names as no longer active
Iso.objects.filter(active=True).exclude(name__in=active_isos).update(
active=False, removed=now())