Skip to content

Commit

Permalink
Merge pull request #71 from codeforIATI/70-fix-briefly-withdrawn
Browse files Browse the repository at this point in the history
Fix to briefly withdrawn codes
  • Loading branch information
markbrough authored Nov 8, 2023
2 parents 341b3c3 + 76bb085 commit 71f0733
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions importers/helpers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@ def update_codelist_item(self, codelist_item, code_dict, namespaces=None):
else:
narrative = codelist_item.xpath(k, namespaces=namespaces)[0]
narrative.text = v
if '@status' not in code_dict.keys():
# This code exists, so it should be set to be active, unless
# the status is set manually. This is required in case
# a codelist briefly disappears then reappears in the source
# data.
codelist_item.set('status', 'active')
return codelist_item

def source_to_xml(self):
Expand Down

0 comments on commit 71f0733

Please sign in to comment.