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:
@@ -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