Fix unique validation when modifying products from template
This commit is contained in:
parent
d2aad1aa01
commit
db751d5e6e
|
@ -102,7 +102,7 @@ class Product:
|
|||
|
||||
@classmethod
|
||||
def validate_unique_template(cls, products):
|
||||
unique_products = [p for p in products if p.unique_variant]
|
||||
unique_products = list(set(p for p in products if p.unique_variant))
|
||||
templates = [p.template.id for p in unique_products]
|
||||
if len(set(templates)) != len(templates):
|
||||
cls.raise_user_error('template_uniq')
|
||||
|
|
Loading…
Reference in New Issue