Skip to content

Commit

Permalink
[FIX] product_variant_default_code: case of reference_mask is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
astirpe committed Dec 6, 2024
1 parent 88b0bfe commit 6750e1a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions product_variant_default_code/models/product.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ def _generate_default_code(self):
value_codes
):
return None
elif not self.product_tmpl_id.reference_mask:
return None

Check warning on line 231 in product_variant_default_code/models/product.py

View check run for this annotation

Codecov / codecov/patch

product_variant_default_code/models/product.py#L231

Added line #L231 was not covered by tests
else:
product_attrs = defaultdict(str)
reference_mask = ReferenceMask(self.product_tmpl_id.reference_mask)
Expand Down

0 comments on commit 6750e1a

Please sign in to comment.