mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-16 21:26:33 +00:00
code cleanup
This commit is contained in:
parent
552980e208
commit
630f508ee4
2 changed files with 3 additions and 3 deletions
|
@ -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 ""
|
||||
|
|
|
@ -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}
|
||||
|
|
Loading…
Reference in a new issue