core: handle price 0 or None in Inventory API
The methods used in indexing did not make a difference between the case where the price is None (ie. price is not set) or where the price is set to 0 - in both cases this was saved as NULL in stock.total_price column. This is incorrect, we need to keep the distinction between these two cases also for inventory calculation. We had some places where we select IFNULL(stock.total_price, 0) to work around this, we don't plan to change the existing ones for now, but while discussing on !1974 we concluded that a newly idenfified case of a problem consequence of these NULL should be handled by fixing the indexation. To benefit from the fix, impacted instances will have to reindex documents present in the stock table with stock.total_price is null.
Showing
Please register or sign in to comment