Don't include grid filters for LargeBinary columns

This commit is contained in:
Lance Edgar 2018-10-19 20:26:33 -05:00
parent e277a19f71
commit 7e28619e9d

View file

@ -395,8 +395,16 @@ class Grid(object):
if self.model_class: if self.model_class:
mapper = orm.class_mapper(self.model_class) mapper = orm.class_mapper(self.model_class)
for prop in mapper.iterate_properties: for prop in mapper.iterate_properties:
if isinstance(prop, orm.ColumnProperty) and not prop.key.endswith('uuid'): if not isinstance(prop, orm.ColumnProperty):
filters[prop.key] = self.make_filter(prop.key, prop.columns[0]) continue
if prop.key.endswith('uuid'):
continue
if len(prop.columns) != 1:
continue
column = prop.columns[0]
if isinstance(column.type, sa.LargeBinary):
continue
filters[prop.key] = self.make_filter(prop.key, column)
return filters return filters
def make_filters(self, filters=None): def make_filters(self, filters=None):