Modify importer to pick deadline from documents when there's an exact

match, otherwise prefer what's stored with the review request (fixes
a bunch of cases with multiple reviews of the same draft)
 - Legacy-Id: 12246
This commit is contained in:
Ole Laursen 2016-11-02 12:37:47 +00:00
parent b9d5352afd
commit 67e6423cb4

View file

@ -372,14 +372,17 @@ with db_con.cursor() as c:
continue # ignore
meta = doc_metadata.get((row.docname, row.version))
if not meta:
meta = doc_metadata.get(row.docname)
deadline, telechat, lcend, status = meta or (None, None, None, None)
if not deadline:
deadline = parse_timestamp(row.timeout)
if not meta:
meta = doc_metadata.get(row.docname)
telechat, lcend, status = (meta or (None, None, None, None))[1:]
if not deadline and meta:
deadline = meta[1]
reviewed_rev = row.version if row.version and row.version != "99" else ""
if row.summary == "noresponse":
reviewed_rev = ""