Call in is_quantity_allowed always expects two return values
And also expects that basket_threshold is an integer
@@ -141,6 +141,7 @@ class AbstractBasket(models.Model):
with the respect to basket quantity threshold.
"""
basket_threshold = settings.OSCAR_MAX_BASKET_QUANTITY_THRESHOLD
+ max_allowed = 0
if basket_threshold:
total_basket_quantity = self.num_items
max_allowed = basket_threshold - total_basket_quantity
