Skip to content

Commit 1174eab

Browse files
author
Tim Davies
committed
Adding support for deprecation. Closes #82
1 parent c299c0b commit 1174eab

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

prefix_finder/frontend/views.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,8 +541,17 @@ def make_xml_codelist():
541541
publicdb = str(1)
542542
else:
543543
publicdb = str(0)
544-
545-
item = ET.SubElement(items, "codelist-item",**{'public-database':publicdb})
544+
545+
if entry['deprecated']:
546+
status = 'withdrawn'
547+
else:
548+
if entry['confirmed']:
549+
status = 'active'
550+
else:
551+
status = 'draft'
552+
553+
554+
item = ET.SubElement(items, "codelist-item",**{'public-database':publicdb,'status':status})
546555
ET.SubElement(item, "code").text = entry['code']
547556

548557
name = ET.SubElement(item, "name")

0 commit comments

Comments
 (0)