Skip to content

Commit e41e637

Browse files
authored
Merge pull request #88 from OpenDataServices/82-interface-updates
Adding support for deprecation. Closes #82
2 parents 6e33ae2 + 975236e commit e41e637

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)