Refactors book ingest from openlibrary

it's very repetetive now but also works way better so who can say
This commit is contained in:
Mouse Reeve
2020-04-05 17:00:01 -07:00
parent 94efe860b0
commit 26d9454ec3
2 changed files with 132 additions and 95 deletions

View File

@ -352,6 +352,8 @@ def book_page(request, book_identifier, tab='friends'):
if isinstance(book, models.Work):
book = book.default_edition
if not book:
return HttpResponseNotFound()
work = book.parent_work
if not work: