diff --git a/euscanwww/djeuscan/management/commands/scan-metadata.py b/euscanwww/djeuscan/management/commands/scan-metadata.py index da9f26e..983f2d7 100644 --- a/euscanwww/djeuscan/management/commands/scan-metadata.py +++ b/euscanwww/djeuscan/management/commands/scan-metadata.py @@ -88,7 +88,7 @@ class Command(BaseCommand): old_maintainers = set(existing_maintainers).difference(maintainers.keys()) for herd in obj.herds.all(): - if herd.email in old_herds: + if herd.herd in old_herds: obj.herds.remove(herd) for herd in new_herds: diff --git a/euscanwww/djeuscan/management/commands/scan-upstream.py b/euscanwww/djeuscan/management/commands/scan-upstream.py index 4469f38..1c79f3f 100644 --- a/euscanwww/djeuscan/management/commands/scan-upstream.py +++ b/euscanwww/djeuscan/management/commands/scan-upstream.py @@ -9,6 +9,7 @@ from datetime import datetime from portage import versions from optparse import make_option +from django.utils import timezone from django.db.transaction import commit_on_success from django.core.management.base import BaseCommand, CommandError from djeuscan.models import Package, Version, EuscanResult, VersionLog @@ -120,7 +121,7 @@ class Command(BaseCommand): obj = EuscanResult() obj.package = package obj.result = log - obj.datetime = datetime.now() + obj.datetime = timezone.now() obj.save() diff --git a/euscanwww/djeuscan/management/commands/update-counters.py b/euscanwww/djeuscan/management/commands/update-counters.py index 65a6179..fc29845 100644 --- a/euscanwww/djeuscan/management/commands/update-counters.py +++ b/euscanwww/djeuscan/management/commands/update-counters.py @@ -5,6 +5,7 @@ from optparse import make_option from django.db.models import Count, Sum from django.db.transaction import commit_on_success from django.core.management.base import BaseCommand, CommandError +from django.utils import timezone from djeuscan.models import Package, Herd, Maintainer, Version from djeuscan.models import HerdLog, MaintainerLog, CategoryLog, WorldLog @@ -44,7 +45,7 @@ class Command(BaseCommand): @commit_on_success def handle(self, *args, **options): - now = datetime.datetime.now() + now = timezone.now() categories = {} herds = {}