mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-01-27 01:18:15 +00:00
Make sure book is in the right format
This commit is contained in:
parent
08f4ad6cd4
commit
c245ad09bb
1 changed files with 2 additions and 0 deletions
|
@ -145,6 +145,8 @@ def handle_imported_book(item):
|
|||
item.book = item.book.default_edition
|
||||
if not item.book:
|
||||
return
|
||||
if not isinstance(item.book, models.Edition):
|
||||
item.book = item.book.edition
|
||||
|
||||
existing_shelf = models.ShelfBook.objects.filter(book=item.book, user=user).exists()
|
||||
|
||||
|
|
Loading…
Reference in a new issue