fixed goodreads loader

pull/1/head
eric 2012-01-16 19:34:35 -05:00
parent 789b3ec118
commit 6f11308ab9
1 changed files with 2 additions and 2 deletions

View File

@ -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: