From fb55fc4c4b10962026fa637b9a728a1f105c34f9 Mon Sep 17 00:00:00 2001 From: Ole Laursen Date: Sat, 7 Dec 2013 12:28:47 +0000 Subject: [PATCH] Replace reference to redesign.doc.models, replace redundant filter on both type=draft and state=rfc in community script - Legacy-Id: 6830 --- .../management/commands/update_doc_change_dates.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ietf/community/management/commands/update_doc_change_dates.py b/ietf/community/management/commands/update_doc_change_dates.py index 825edb539..32dbf22fd 100644 --- a/ietf/community/management/commands/update_doc_change_dates.py +++ b/ietf/community/management/commands/update_doc_change_dates.py @@ -5,18 +5,18 @@ from django.db.models import Q from ietf.community.constants import SIGNIFICANT_STATES from ietf.community.models import DocumentChangeDates -from redesign.doc.models import Document +from ietf.doc.models import Document class Command(BaseCommand): help = (u"Update drafts in community lists by reviewing their rules") def handle(self, *args, **options): - documents = Document.objects.filter(Q(type__name='Draft') | Q(states__name='rfc')).distinct() + documents = Document.objects.filter(type='draft') index = 1 total = documents.count() - for doc in documents: + for doc in documents.iterator(): (changes, created) = DocumentChangeDates.objects.get_or_create(document=doc) new_version = doc.latest_event(type='new_revision') normal_change = doc.latest_event()