Skip to content

Commit

Permalink
common: fixes bug in country parsing method
Browse files Browse the repository at this point in the history
Signed-off-by: pamfilos <[email protected]>
  • Loading branch information
pamfilos committed Dec 5, 2024
1 parent cc26d80 commit 3911d52
Show file tree
Hide file tree
Showing 3 changed files with 21,891 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dags/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def parse_country_from_value(affiliation_value):

if len(mapped_countries) > 1 or len(mapped_countries) == 0:
raise FoundMoreThanOneMatchOrNone(affiliation_value)
return mapped_countries[0].name
return mapped_countries[0].get("name", "")
except (LookupError, FoundMoreThanOneMatchOrNone):
return find_country_match_from_mapping(affiliation_value)

Expand Down
Loading

0 comments on commit 3911d52

Please sign in to comment.