Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved wishlist based on @dfalk's work #105

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Prev Previous commit
Fix AttributeError in login hook
  • Loading branch information
uranusjr committed Apr 28, 2013
commit c6f0abc7ade3c9ed7fe64604811d892e67c326c3
4 changes: 3 additions & 1 deletion cartridge/shop/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,9 @@ class Meta:

@receiver(user_logged_in, sender=User)
def transfer_wishlist_data(sender, request, user, *args, **kwargs):
skus = request.wishlist
skus = getattr(request, "wishlist", [])
if not skus:
return
existed = (Wishlist.objects.filter(user=user, sku__in=skus)
.values_list("sku", flat=True))
for sku in skus:
Expand Down