code cleanup

This commit is contained in:
Hugh Rundle 2021-11-01 11:39:37 +11:00
parent 552980e208
commit 630f508ee4
2 changed files with 3 additions and 3 deletions

View file

@ -1,6 +1,5 @@
""" template filters for really common utilities """
import os
from functools import reduce
from uuid import uuid4
from django import template
from django.utils.translation import gettext_lazy as _
@ -77,5 +76,5 @@ def get_isni_bio(existing, author):
for value in existing:
if "bio" in value and author.isni == value["isni"]:
return value["bio"]
return ""

View file

@ -120,6 +120,7 @@ def get_author_isni_data(isni):
return author
def build_author_dict(match_value):
# if it is an isni value get the data
@ -127,4 +128,4 @@ def build_author_dict(match_value):
isni = match_value.replace("isni_match_", "")
return get_author_isni_data(isni)
# otherwise it's a name string
return {"name": match_value}
return {"name": match_value}