summaryrefslogtreecommitdiff
path: root/mirrors
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2013-02-09 16:43:40 -0600
committerDan McGee <dan@archlinux.org>2013-02-09 16:50:45 -0600
commit5566d43a7734f6bb2f48d5d511351da12ddc5cc1 (patch)
treed575d2c100a039100771fdc9ed056d33da23b6c3 /mirrors
parent8524a6057c4b99a620850494a22eb3d1f56bee68 (diff)
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 'mirrors')
-rw-r--r--mirrors/management/commands/mirrorresolv.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mirrors/management/commands/mirrorresolv.py b/mirrors/management/commands/mirrorresolv.py
index 0370f8ed..a6c2523e 100644
--- a/mirrors/management/commands/mirrorresolv.py
+++ b/mirrors/management/commands/mirrorresolv.py
@@ -53,7 +53,7 @@ def resolve_mirrors():
newvals = (mirrorurl.has_ipv4, mirrorurl.has_ipv6)
if newvals != oldvals:
logger.debug("values changed for %s", mirrorurl)
- mirrorurl.save(force_update=True)
+ mirrorurl.save(update_fields=('has_ipv4', 'has_ipv6'))
except socket.error, e:
logger.warn("error resolving %s: %s", mirrorurl.hostname, e)