Fixes for goodreads import + ol changes
This commit is contained in:
parent
ca26a712c3
commit
0a8d080b62
2 changed files with 8 additions and 3 deletions
|
@ -167,6 +167,10 @@ def handle_import_books(user, items):
|
|||
identifier=item.shelf,
|
||||
user=user
|
||||
)
|
||||
if isinstance(item.book, models.Work):
|
||||
item.book = item.book.default_edition
|
||||
if not item.book:
|
||||
continue
|
||||
_, created = models.ShelfBook.objects.get_or_create(
|
||||
book=item.book, shelf=desired_shelf, added_by=user)
|
||||
if created:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue