Browse Source

Tighten type check in domain (closes #15)

pull/37/head
Sandy Carter 11 years ago
committed by Alexandre Fayolle
parent
commit
9b6eee8e46
  1. 9
      mass_editing/mass_editing.py

9
mass_editing/mass_editing.py

@ -32,10 +32,11 @@ class ir_model_fields(orm.Model):
count=False): count=False):
model_domain = [] model_domain = []
for domain in args: 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: else:
model_domain.append(domain) model_domain.append(domain)
return super(ir_model_fields, self).search( return super(ir_model_fields, self).search(

Loading…
Cancel
Save