Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Throw exception or return None in check_quantity
Michal Ociepkaa2c42da9b907
diff --git a/cart/__init__.py b/cart/__init__.pyindex 094cf851d6..b3d16b11e5 100755--- a/cart/__init__.py+++ b/cart/__init__.py@@ -126,9 +126,9 @@ class Cart(cart.Cart):Raises exception when product has stock and user insert too bigquantity.'''+ super(Cart, self).check_quantity(product, quantity, data)if isinstance(product, StockedProduct) and quantity > product.stock:raise InsufficientStockException(product)- return super(Cart, self).check_quantity(product, quantity, data)def remove_cart_from_request(request):