Skip to content

Commit

Permalink
🚑 Comparing apples and oranges
Browse files Browse the repository at this point in the history
ir.actions.report(287,) == 287
  • Loading branch information
Ivan Yelizariev committed Sep 24, 2018
1 parent 2c3cf5a commit b34bda0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion web_website/models/website_dependent_mixin.py
Expand Up @@ -63,7 +63,14 @@ def _force_default(self, field_name, prop_value):
if default_prop.company_id:
vals['company_id'] = None

if default_prop.get_by_record() != prop_value:
value = default_prop.get_by_record()
try:
# many2one field is an object here
value = value.id
except AttributeError:
pass

if value != prop_value:
vals['value'] = prop_value

default_prop.write(vals)
Expand Down

0 comments on commit b34bda0

Please sign in to comment.