Skip to content
Snippets Groups Projects
Unverified Commit 37bbe87d authored by Martin Trigaux's avatar Martin Trigaux
Browse files

[INP] gamification: skip check for not required fields

Could get a definition with a model only
parent a4687c6e
Branches
Tags
No related merge requests found
......@@ -152,6 +152,9 @@ class gamification_goal_definition(osv.Model):
""" make sure the selected field and model are usable"""
for definition in self.browse(cr, uid, ids, context=context):
try:
if not definition.model_id or not definition.field_id:
continue
model = self.pool[definition.model_id.model]
field = model._fields[definition.field_id.name]
if not field.store:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment