Skip to content

Commit 662ac0d

Browse files
committed
Pick new RFC's too, instead of just associated
- Legacy-Id: 3882
1 parent 74caa2e commit 662ac0d

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

redesign/importing/import-docs.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ def import_from_idinternal(d, idinternal):
771771

772772
all_drafts = InternetDraft.objects.all().order_by('pk').select_related()
773773
if import_docs_from:
774-
all_drafts = all_drafts.filter(last_modified_date__gte=import_docs_from)
774+
all_drafts = all_drafts.filter(last_modified_date__gte=import_docs_from) | all_drafts.filter(idinternal__event_date__gte=import_docs_from)
775775

776776
if document_name_to_import:
777777
if document_name_to_import.startswith("rfc"):
@@ -1098,7 +1098,11 @@ def get_or_create_rfc_document(rfc_number):
10981098
else:
10991099
# if we didn't process all drafts, limit the RFCs to the ones we
11001100
# did process
1101-
all_rfcs = all_rfcs.filter(rfc_number__in=set(d.rfc_number for d in all_drafts if d.rfc_number))
1101+
rfc_numbers = set(d.rfc_number for d in all_drafts if d.rfc_number)
1102+
if import_docs_from:
1103+
all_rfcs = all_rfcs.filter(rfc_number__in=rfc_numbers) | all_rfcs.filter(rfc_published_date__gte=import_docs_from)
1104+
else:
1105+
all_rfcs = all_rfcs.filter(rfc_number__in=rfc_numbers)
11021106

11031107
for index, o in enumerate(all_rfcs.iterator()):
11041108
print "importing rfc%s" % o.rfc_number, index

0 commit comments

Comments
 (0)