Skip to content

Commit 1861586

Browse files
committed
Make sure expiration date is imported even if a DocumentComment is lacking (noticed by Ryan Cross)
- Legacy-Id: 3705
1 parent d8fe519 commit 1861586

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

redesign/importing/import-docs.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -980,6 +980,16 @@ def import_from_idinternal(d, idinternal):
980980
e.desc = "Last call sent"
981981
e.save()
982982

983+
e = d.latest_event(type="expired_document")
984+
if o.expiration_date and not e:
985+
e = DocEvent(type="expired_document")
986+
e.time = o.expiration_date
987+
e.by = system
988+
e.doc = d
989+
e.desc = "Document is expired by system"
990+
e.save()
991+
992+
983993
# import other attributes
984994

985995
# tags

0 commit comments

Comments
 (0)