[Website] [Shopping Cart]

Hello all,
Wanted some clarificatio on possible bug in shopping cart while placing order.

As per intended functionality, on clicking place order in cart, it checks the quantity of stock in the website warehouse and throws an exception message if the quantity of order being placed > quantity of stock in warehouse.
But this is not happening functionally. Exception message is not being thrown and Sales order is being created even if stock in warehouse is less than that of order placed. I found this due to the below linked line.

What is happening is values are not being correctly assigned to the variables while tuple unpacking because of None, None condition at the end. If we remove that, then it works fine.

@kartik check may be your negative stock is allowed in setting.

Negative stock is disabled. Still can place order.