Commits

funkybob  committed f5d7d7e

Fixed logic of cart_update

  • Participants
  • Parent commits 5faa994

Comments (0)

Files changed (1)

File catalogue/views.py

     '''Update quantities in cart'''
     # List of item pkeys to remove
     remove_list = set(int(x) for x in request.POST.getlist('remove'))
-    remove = set(remove_list)
+    # List of item instances to remove
+    remove = set()
     for item in request.cart:
-        if item.item.pk in remove:
+        if item.item.pk in remove_list:
             remove.add(item)
         else:
             val = int(request.POST['item_%d' % item.item.pk])