Skip to content

Commit

Permalink
Tighten type check in domain (closes OCA#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandy Carter authored and gurneyalex committed Aug 13, 2014
1 parent 4c38478 commit 9b6eee8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions mass_editing/mass_editing.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ def search(
count=False):
model_domain = []
for domain in args:
if domain[0] == 'model_id' and domain[2]\
and type(domain[2]) != list:
model_domain += [(
'model_id', 'in', map(int, domain[2][1:-1].split(',')))]
if (len(domain) > 2 and domain[0] == 'model_id'
and isinstance(domain[2], basestring)):
model_domain += [
('model_id', 'in', map(int, domain[2][1:-1].split(',')))
]
else:
model_domain.append(domain)
return super(ir_model_fields, self).search(
Expand Down

0 comments on commit 9b6eee8

Please sign in to comment.