clarifying kwarg

pull/1/head
Andromeda Yelton 2012-10-16 11:36:51 -04:00
parent ae9a541ed5
commit 3831a1ea59
3 changed files with 5 additions and 5 deletions

View File

@ -296,7 +296,7 @@ def load_goodreads_shelf_into_wishlist(user, shelf_name='all', goodreads_user_id
match = re.search('/show/(\d+)', link)
if match:
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)
else:
logger.error("unable to extract goodreads id from %s", link)

View File

@ -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)
if book['lc_call_number']:
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:
tasks.populate_edition.delay(edition.isbn_13)
logger.info("Work with isbn %s added to wishlist.", isbn)

View File

@ -990,7 +990,7 @@ class PledgeCompleteView(TemplateView):
# 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):
# ok to overwrite Wishes.source?
user.wishlist.add_work(work, 'pledging', True)
user.wishlist.add_work(work, 'pledging', notify=True)
worklist = slideshow(8)
works = worklist[:4]
@ -1513,7 +1513,7 @@ def wishlist(request):
if edition.new:
# add related editions asynchronously
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:
logger.warning("failed to load googlebooks_id %s" % googlebooks_id)
except Exception, e:
@ -1541,7 +1541,7 @@ def wishlist(request):
except models.WasWork.DoesNotExist:
raise Http404
request.user.wishlist.add_work(work,'user', True)
request.user.wishlist.add_work(work,'user', notify=True)
return HttpResponseRedirect('/')
class InfoPageView(TemplateView):