Prevent to compare with None on searching quantity

issue11047
review387481002
This commit is contained in:
Bernat
2021-12-18 01:38:39 +01:00
parent f9b81cddb5
commit f68c8867a6
+2 -1
View File
@@ -157,7 +157,8 @@ class StockMixin(object):
}.get(operator_, lambda v, l: False)
record_ids = []
for key, quantity in pbl.items():
if operator_(quantity, operand):
if (quantity is not None and operand is not None
and operator_(quantity, operand)):
# pbl could return None in some keys
if key[position] is not None:
record_ids.append(key[position])