From b25b361e11c63d86efb5176eda971cb57cc077c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 11 Feb 2016 22:27:31 +0100 Subject: [PATCH] Don't compare quantity if quantity is None issue5303 review18971002 --- price_list.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/price_list.py b/price_list.py index e257313096..bfbab734e7 100644 --- a/price_list.py +++ b/price_list.py @@ -144,7 +144,8 @@ class PriceListLine(ModelSQL, ModelView, MatchMixin): def match(self, pattern): if 'quantity' in pattern: pattern = pattern.copy() - if self.quantity > pattern.pop('quantity'): + quantity = pattern.pop('quantity') + if self.quantity is not None and self.quantity > quantity: return False return super(PriceListLine, self).match(pattern)