fixed goodreads loader
parent
789b3ec118
commit
6f11308ab9
|
@ -13,6 +13,7 @@ import django.utils.encoding
|
|||
|
||||
import regluit.core
|
||||
from regluit.core import bookloader
|
||||
from regluit.core import models
|
||||
|
||||
# import parse_qsl from cgi if it doesn't exist in urlparse
|
||||
try:
|
||||
|
@ -286,8 +287,7 @@ def load_goodreads_shelf_into_wishlist(user, shelf_name='all', goodreads_user_id
|
|||
link = review['book']['link']
|
||||
match = re.search('/show/(\d+)', link)
|
||||
if match:
|
||||
edition.goodreads_id = match.group(1)
|
||||
edition.save()
|
||||
identifier= models.Identifier.get_or_add(type = 'gdrd', value = match.group(1), edition = edition, work = edition.work)
|
||||
user.wishlist.add_work(edition.work, 'goodreads')
|
||||
logger.info("Work with isbn %s added to wishlist.", isbn)
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue