Skip to content

Commit 8eeef2d

Browse files
committed
Send out expires as "null" in JSON rather than crashing if there's no
expiry on a document - Legacy-Id: 5079
1 parent 8165048 commit 8eeef2d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ietf/idrfc/views_doc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ def extract_name(s):
388388
name=doc.group.name,
389389
type=extract_name(doc.group.type),
390390
acronym=doc.group.acronym)
391-
data["expires"] = doc.expires.strftime("%Y-%m-%d %H:%M:%S")
391+
data["expires"] = doc.expires.strftime("%Y-%m-%d %H:%M:%S") if doc.expires else None
392392
data["title"] = doc.title
393393
data["abstract"] = doc.abstract
394394
data["aliases"] = list(doc.docalias_set.values_list("name", flat=True))

0 commit comments

Comments
 (0)