fixed same bug for library thing loading
parent
6f11308ab9
commit
5dea6b7fea
|
@ -6,6 +6,7 @@ import HTMLParser
|
|||
import logging
|
||||
import re
|
||||
from datetime import datetime
|
||||
from regluit.core import models
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
@ -214,10 +215,9 @@ def load_librarything_into_wishlist(user, lt_username, max_books=None):
|
|||
if not edition:
|
||||
continue
|
||||
# add the librarything ids to the db since we know them now
|
||||
edition.librarything_id = book['book_id']
|
||||
edition.save()
|
||||
edition.work.librarything_id = book['work_id']
|
||||
edition.work.save()
|
||||
identifier= models.Identifier.get_or_add(type = 'thng', value = book['book_id'], edition = edition, work = edition.work)
|
||||
identifier= models.Identifier.get_or_add(type = 'ltwk', value = book['work_id'], work = edition.work)
|
||||
|
||||
user.wishlist.add_work(edition.work, 'librarything')
|
||||
if edition.new:
|
||||
regluit.core.tasks.populate_edition.delay(edition)
|
||||
|
|
Loading…
Reference in New Issue