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

Commit

Permalink
Changes to use enhanced domain validation for defaults.
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard deMeester committed May 5, 2017
1 parent 5e2676b commit 30fdbb1
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions product_configurator/models/product.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,17 +472,8 @@ def find_default_value(self, selectable_value_ids, value_ids):
# No domain - always considered true. Use this.
break
domains = default_line.mapped('domain_id').compute_domain()
for domain in domains:
if domain[1] == 'in':
if not set(domain[2]) & set(value_ids):
# Domain mismatch, skip this line
break
else:
if set(domain[2]) & set(value_ids):
# Domain mismatch, skip this line
break
else:
# All domains OK, use this
if self.validate_domains_against_sels(domains, value_ids):
# Domain OK, use this
break
else:
# parsed all lines without a match
Expand Down

0 comments on commit 30fdbb1

Please sign in to comment.