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:
|
||||
continue
|
||||
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)
|
||||
|
||||
return sorters
|
||||
|
|
Loading…
Reference in a new issue