select correct isni record when adding authors

The original implementation of this was so, so broken.
Now it's not.
This commit is contained in:
Hugh Rundle
2021-11-01 11:34:32 +11:00
parent 37148c5127
commit 552980e208
4 changed files with 18 additions and 14 deletions

View File

@ -119,3 +119,12 @@ def get_author_isni_data(isni):
author["aliases"].append(make_name_string(entry))
return author
def build_author_dict(match_value):
# if it is an isni value get the data
if match_value.startswith("isni_match_"):
isni = match_value.replace("isni_match_", "")
return get_author_isni_data(isni)
# otherwise it's a name string
return {"name": match_value}