fix: avoid error when checking model for column property
assocation proxy sometimes throws a wrench in that..
This commit is contained in:
parent
dce91a3a96
commit
784f974c0d
|
@ -578,7 +578,8 @@ class Grid:
|
||||||
if key in sorters:
|
if key in sorters:
|
||||||
continue
|
continue
|
||||||
prop = getattr(self.model_class, key, None)
|
prop = getattr(self.model_class, key, None)
|
||||||
if prop and isinstance(prop.property, orm.ColumnProperty):
|
if (prop and hasattr(prop, 'property')
|
||||||
|
and isinstance(prop.property, orm.ColumnProperty)):
|
||||||
sorters[prop.key] = self.make_sorter(prop)
|
sorters[prop.key] = self.make_sorter(prop)
|
||||||
|
|
||||||
return sorters
|
return sorters
|
||||||
|
|
Loading…
Reference in a new issue