Skip to content
This repository was archived by the owner on Apr 28, 2022. It is now read-only.

Commit 6d0db3d

Browse files
committed
[FIX] Restricting attribute line attr only for lines with value_ids in it
1 parent 5f5a8e9 commit 6d0db3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

product_configurator/models/product_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def onchange_attribute(self):
194194
@api.multi
195195
@api.constrains('value_ids')
196196
def check_value_attributes(self):
197-
for line in self:
197+
for line in self.filtered(lambda l: l.value_ids):
198198
value_attributes = line.value_ids.mapped('attribute_id')
199199
if value_attributes != line.attribute_line_id.attribute_id:
200200
raise ValidationError(

0 commit comments

Comments
 (0)