Do not read product customers's data when product is empty

issue11172
review381761002
This commit is contained in:
Sergi Almacellas Abellana
2022-01-24 17:21:33 +01:00
parent 4380453bf2
commit c098c2af37
+1 -1
View File
@@ -95,7 +95,7 @@ class AmendmentLine(metaclass=PoolMeta):
super().on_change_product()
except AttributeError:
pass
if not self.product and not self.line:
if not self.product or not self.line:
return
product_customers = list(self.product.product_customer_used(
**self.line._get_product_customer_pattern()))