From 784f974c0dcb9b765a1b3551c88883c61c19f221 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Mon, 19 Aug 2024 12:42:14 -0500 Subject: [PATCH] fix: avoid error when checking model for column property assocation proxy sometimes throws a wrench in that.. --- src/wuttaweb/grids/base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wuttaweb/grids/base.py b/src/wuttaweb/grids/base.py index 9a6b195..23033a5 100644 --- a/src/wuttaweb/grids/base.py +++ b/src/wuttaweb/grids/base.py @@ -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