Improve assertion in convert_domain of Function field
The field name from the domain could be a nested if the Function field is relational. So it must just if it starts with the name of the field.
This commit is contained in:
1 parent
4d5046f028
commit
dd3e0a4c2a
1 file changed
+1
-1
@@ -63,7 +63,7 @@ class Function(Field):
|
||||
|
||||
def convert_domain(self, domain, tables, Model):
|
||||
name, operator, value = domain[:3]
|
||||
assert name == self.name
|
||||
assert name.startswith(self.name)
|
||||
method = getattr(Model, 'domain_%s' % name, None)
|
||||
if method:
|
||||
return method(domain, tables)
|
||||
|
||||
Reference in new issue
Block a user