Commits

Anonymous committed da64a87

Fixed small bug in Cart.get_name().

  • Participants
  • Parent commits cfb9f94

Comments (0)

Files changed (1)

lfs/cart/models.py

         return amount
 
     def get_name(self):
-        cart_name = ""
-        for cart_item in self.items.all():
-            if cart_name.product is not None:
-                cart_name = cart_name + cart_name.product.get_name() + ", "
+        cart_name = []
+        for item in self.items.all():
+            if item.product is not None:
+                cart_name.append(item.product.get_name())
 
-        cart_name.strip(', ')
+        cart_name = ", ".join(cart_name)
         return cart_name
 
     def get_price_gross(self):