Don't compare quantity if quantity is None
issue5303 review18971002
This commit is contained in:
1 parent
94ec39e492
commit
b25b361e11
1 file changed
+2
-1
+2
-1
@@ -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)
|
||||
|
||||
|
||||
Reference in new issue
Block a user