From 1861586dc361494d392c5b1bb2175f0fc37470cd Mon Sep 17 00:00:00 2001 From: Ole Laursen Date: Thu, 24 Nov 2011 18:25:54 +0000 Subject: [PATCH] Make sure expiration date is imported even if a DocumentComment is lacking (noticed by Ryan Cross) - Legacy-Id: 3705 --- redesign/importing/import-docs.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/redesign/importing/import-docs.py b/redesign/importing/import-docs.py index e3401e520..117b1ea15 100755 --- a/redesign/importing/import-docs.py +++ b/redesign/importing/import-docs.py @@ -980,6 +980,16 @@ for index, o in enumerate(all_drafts.iterator()): e.desc = "Last call sent" e.save() + e = d.latest_event(type="expired_document") + if o.expiration_date and not e: + e = DocEvent(type="expired_document") + e.time = o.expiration_date + e.by = system + e.doc = d + e.desc = "Document is expired by system" + e.save() + + # import other attributes # tags