Merge branch 'hotfix/cart-add-nonetype'

This commit is contained in:
Nathan Chapman 2023-06-26 07:39:56 -06:00
commit 021313b5a6

View File

@ -166,7 +166,7 @@ class Cart:
elif item.quantity > item.variant.product.checkout_limit:
messages.warning(self.request, 'Quantity exceeds checkout limit.')
item.quantity = item.variant.product.checkout_limit
elif item.quantity > item.variant.order_limit:
elif item.variant.order_limit and (item.quantity > item.variant.order_limit):
messages.warning(self.request, 'Quantity exceeds order limit.')
item.quantity = item.variant.order_limit