mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-01-07 07:45:28 +00:00
pylint Y U like this?
This commit is contained in:
parent
6556090524
commit
c3ba7ba547
3 changed files with 4 additions and 2 deletions
|
@ -84,6 +84,7 @@ def get_isni_bio(existing, author):
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
|
||||||
|
# pylint: disable=unused-argument
|
||||||
@register.filter(name="get_isni", needs_autoescape=True)
|
@register.filter(name="get_isni", needs_autoescape=True)
|
||||||
def get_isni(existing, author, autoescape=True):
|
def get_isni(existing, author, autoescape=True):
|
||||||
"""Returns the isni ID if an existing author has an ISNI listing"""
|
"""Returns the isni ID if an existing author has an ISNI listing"""
|
||||||
|
|
|
@ -146,7 +146,7 @@ def augment_author_metadata(author, isni):
|
||||||
)
|
)
|
||||||
author.bio = isni_data["bio"] if len(author.bio) == 0 else author.bio
|
author.bio = isni_data["bio"] if len(author.bio) == 0 else author.bio
|
||||||
aliases = set(isni_data["aliases"])
|
aliases = set(isni_data["aliases"])
|
||||||
for x in author.aliases:
|
for alias in author.aliases:
|
||||||
aliases.add(x)
|
aliases.add(alias)
|
||||||
author.aliases = list(aliases)
|
author.aliases = list(aliases)
|
||||||
author.save()
|
author.save()
|
||||||
|
|
|
@ -148,6 +148,7 @@ class EditBook(View):
|
||||||
class ConfirmEditBook(View):
|
class ConfirmEditBook(View):
|
||||||
"""confirm edits to a book"""
|
"""confirm edits to a book"""
|
||||||
|
|
||||||
|
# pylint: disable=too-many-locals
|
||||||
def post(self, request, book_id=None):
|
def post(self, request, book_id=None):
|
||||||
"""edit a book cool"""
|
"""edit a book cool"""
|
||||||
# returns None if no match is found
|
# returns None if no match is found
|
||||||
|
|
Loading…
Reference in a new issue