From 8eeef2def41971643a112bf66c4e0bc74e122e5d Mon Sep 17 00:00:00 2001 From: Ole Laursen Date: Tue, 27 Nov 2012 12:08:56 +0000 Subject: [PATCH] Send out expires as "null" in JSON rather than crashing if there's no expiry on a document - Legacy-Id: 5079 --- ietf/idrfc/views_doc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ietf/idrfc/views_doc.py b/ietf/idrfc/views_doc.py index 9fdca872c..242a646ab 100644 --- a/ietf/idrfc/views_doc.py +++ b/ietf/idrfc/views_doc.py @@ -388,7 +388,7 @@ def document_json(request, name): name=doc.group.name, type=extract_name(doc.group.type), acronym=doc.group.acronym) - data["expires"] = doc.expires.strftime("%Y-%m-%d %H:%M:%S") + data["expires"] = doc.expires.strftime("%Y-%m-%d %H:%M:%S") if doc.expires else None data["title"] = doc.title data["abstract"] = doc.abstract data["aliases"] = list(doc.docalias_set.values_list("name", flat=True))