summaryrefslogtreecommitdiff
path: root/releng/management/commands/syncisos.py
diff options
context:
space:
mode:
Diffstat (limited to 'releng/management/commands/syncisos.py')
-rw-r--r--releng/management/commands/syncisos.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/releng/management/commands/syncisos.py b/releng/management/commands/syncisos.py
index 62f005ff..c9f61964 100644
--- a/releng/management/commands/syncisos.py
+++ b/releng/management/commands/syncisos.py
@@ -4,8 +4,8 @@ from HTMLParser import HTMLParser, HTMLParseError
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
+from django.utils.timezone import now
-from main.utils import utc_now
from releng.models import Iso
@@ -53,10 +53,9 @@ class Command(BaseCommand):
if not existing.active:
existing.active = True
existing.removed = None
- existing.save()
- now = utc_now()
+ 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)
+ active=False, removed=now())
# vim: set ts=4 sw=4 et: