changeset 4454b5d28be9 in modules/stock:default
details: https://hg.tryton.org/modules/stock?cmd=changeset&node=4454b5d28be9
description:
Prevent to compare with None on searching quantity
issue11047
review387481002
diffstat:
move.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (13 lines):
diff -r 17532f06e2a5 -r 4454b5d28be9 move.py
--- a/move.py Mon Dec 13 23:10:12 2021 +0100
+++ b/move.py Sat Dec 18 01:38:39 2021 +0100
@@ -157,7 +157,8 @@
}.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])