clarifying kwarg
parent
ae9a541ed5
commit
3831a1ea59
|
@ -296,7 +296,7 @@ def load_goodreads_shelf_into_wishlist(user, shelf_name='all', goodreads_user_id
|
||||||
match = re.search('/show/(\d+)', link)
|
match = re.search('/show/(\d+)', link)
|
||||||
if match:
|
if match:
|
||||||
identifier= models.Identifier.get_or_add(type = 'gdrd', value = match.group(1), edition = edition, work = edition.work)
|
identifier= models.Identifier.get_or_add(type = 'gdrd', value = match.group(1), edition = edition, work = edition.work)
|
||||||
user.wishlist.add_work(edition.work, 'goodreads', True)
|
user.wishlist.add_work(edition.work, 'goodreads', notify=True)
|
||||||
logger.info("Work with isbn %s added to wishlist.", isbn)
|
logger.info("Work with isbn %s added to wishlist.", isbn)
|
||||||
else:
|
else:
|
||||||
logger.error("unable to extract goodreads id from %s", link)
|
logger.error("unable to extract goodreads id from %s", link)
|
||||||
|
|
|
@ -228,7 +228,7 @@ def load_librarything_into_wishlist(user, lt_username, max_books=None):
|
||||||
identifier= models.Identifier.get_or_add(type = 'ltwk', value = book['work_id'], work = edition.work)
|
identifier= models.Identifier.get_or_add(type = 'ltwk', value = book['work_id'], work = edition.work)
|
||||||
if book['lc_call_number']:
|
if book['lc_call_number']:
|
||||||
identifier= models.Identifier.get_or_add(type = 'lccn', value = book['lc_call_number'], edition = edition, work = edition.work)
|
identifier= models.Identifier.get_or_add(type = 'lccn', value = book['lc_call_number'], edition = edition, work = edition.work)
|
||||||
user.wishlist.add_work(edition.work, 'librarything', True)
|
user.wishlist.add_work(edition.work, 'librarything', notify=True)
|
||||||
if edition.new:
|
if edition.new:
|
||||||
tasks.populate_edition.delay(edition.isbn_13)
|
tasks.populate_edition.delay(edition.isbn_13)
|
||||||
logger.info("Work with isbn %s added to wishlist.", isbn)
|
logger.info("Work with isbn %s added to wishlist.", isbn)
|
||||||
|
|
|
@ -990,7 +990,7 @@ class PledgeCompleteView(TemplateView):
|
||||||
# fire add-wishlist notification if needed
|
# fire add-wishlist notification if needed
|
||||||
if user is not None and correct_transaction_type and (campaign is not None) and (work is not None):
|
if user is not None and correct_transaction_type and (campaign is not None) and (work is not None):
|
||||||
# ok to overwrite Wishes.source?
|
# ok to overwrite Wishes.source?
|
||||||
user.wishlist.add_work(work, 'pledging', True)
|
user.wishlist.add_work(work, 'pledging', notify=True)
|
||||||
|
|
||||||
worklist = slideshow(8)
|
worklist = slideshow(8)
|
||||||
works = worklist[:4]
|
works = worklist[:4]
|
||||||
|
@ -1513,7 +1513,7 @@ def wishlist(request):
|
||||||
if edition.new:
|
if edition.new:
|
||||||
# add related editions asynchronously
|
# add related editions asynchronously
|
||||||
tasks.populate_edition.delay(edition.isbn_13)
|
tasks.populate_edition.delay(edition.isbn_13)
|
||||||
request.user.wishlist.add_work(edition.work,'user', True)
|
request.user.wishlist.add_work(edition.work,'user', notify=True)
|
||||||
except bookloader.LookupFailure:
|
except bookloader.LookupFailure:
|
||||||
logger.warning("failed to load googlebooks_id %s" % googlebooks_id)
|
logger.warning("failed to load googlebooks_id %s" % googlebooks_id)
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
|
@ -1541,7 +1541,7 @@ def wishlist(request):
|
||||||
except models.WasWork.DoesNotExist:
|
except models.WasWork.DoesNotExist:
|
||||||
raise Http404
|
raise Http404
|
||||||
|
|
||||||
request.user.wishlist.add_work(work,'user', True)
|
request.user.wishlist.add_work(work,'user', notify=True)
|
||||||
return HttpResponseRedirect('/')
|
return HttpResponseRedirect('/')
|
||||||
|
|
||||||
class InfoPageView(TemplateView):
|
class InfoPageView(TemplateView):
|
||||||
|
|
Loading…
Reference in New Issue