From 19bd408fbdd1ebd6d6bb41b70ab7027b953caa25 Mon Sep 17 00:00:00 2001 From: mpeltriaux Date: Tue, 21 Jan 2025 12:52:46 +0100 Subject: [PATCH] # Bugfix code update * fixes bug where empty short names were not resolved properly --- codelist/management/commands/update_codelist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codelist/management/commands/update_codelist.py b/codelist/management/commands/update_codelist.py index d514c993..247c67e2 100644 --- a/codelist/management/commands/update_codelist.py +++ b/codelist/management/commands/update_codelist.py @@ -82,8 +82,8 @@ class Command(BaseKonovaCommand): atom_id = element.find("atomid").text selectable = element.find("selectable").text.lower() selectable = bool_map.get(selectable, False) - short_name = element.find("shortname").text - long_name = element.find("longname").text + short_name = element.find("shortname").text or "" + long_name = element.find("longname").text or "" is_archived = bool_map.get((element.find("archive").text.lower()), False) code = KonovaCode.objects.get_or_create(