Skip to content

Commit af2e2d8

Browse files
committed
Make sure revision number is at least the latest known revision submitted
- Legacy-Id: 3809
1 parent 44c7876 commit af2e2d8

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

redesign/importing/import-docs.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -870,6 +870,13 @@ def import_from_idinternal(d, idinternal):
870870
e.save()
871871
known_revisions.add(v.revision)
872872

873+
# check that the revision number is accurate, there are some bugs
874+
# in the old system, presumably because of the tombstone revision
875+
# hack
876+
revs = list(sorted(known_revisions, reverse=True))
877+
if revs and revs[0] > d.rev:
878+
d.rev = revs[0]
879+
873880
# ietfworkflows history entries
874881
ctype = ContentType.objects.get_for_model(o)
875882
for h in ObjectHistoryEntry.objects.filter(content_type=ctype, content_id=o.pk).order_by('date', 'id'):
@@ -1008,6 +1015,8 @@ def import_from_idinternal(d, idinternal):
10081015

10091016
# the RFC-related attributes are imported when we handle the RFCs below
10101017

1018+
d.save()
1019+
10111020
# now process RFCs
10121021

10131022
def get_or_create_rfc_document(rfc_number):

0 commit comments

Comments
 (0)