Skip to content

Commit fb55fc4

Browse files
committed
Replace reference to redesign.doc.models, replace redundant filter on
both type=draft and state=rfc in community script - Legacy-Id: 6830
1 parent ad1f11e commit fb55fc4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

ietf/community/management/commands/update_doc_change_dates.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@
55

66
from ietf.community.constants import SIGNIFICANT_STATES
77
from ietf.community.models import DocumentChangeDates
8-
from redesign.doc.models import Document
8+
from ietf.doc.models import Document
99

1010

1111
class Command(BaseCommand):
1212
help = (u"Update drafts in community lists by reviewing their rules")
1313

1414
def handle(self, *args, **options):
15-
documents = Document.objects.filter(Q(type__name='Draft') | Q(states__name='rfc')).distinct()
15+
documents = Document.objects.filter(type='draft')
1616
index = 1
1717
total = documents.count()
1818

19-
for doc in documents:
19+
for doc in documents.iterator():
2020
(changes, created) = DocumentChangeDates.objects.get_or_create(document=doc)
2121
new_version = doc.latest_event(type='new_revision')
2222
normal_change = doc.latest_event()

0 commit comments

Comments
 (0)