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
|
item.book = item.book.default_edition
|
||||||
if not item.book:
|
if not item.book:
|
||||||
return
|
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()
|
existing_shelf = models.ShelfBook.objects.filter(book=item.book, user=user).exists()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue