Commit 8157362a authored by Rad Cirskis's avatar Rad Cirskis

allow to use inherited form CharField or TextField fields for searching

parent f5628d79
......@@ -213,10 +213,8 @@ class ModelView(BaseModelView):
if isinstance(p, string_types):
p = getattr(self.model, p)
field_type = type(p)
# Check type
if (field_type != CharField and field_type != TextField):
if not isinstance(p, (CharField, TextField, )):
raise Exception('Can only search on text columns. ' +
'Failed to setup search for "%s"' % p)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment