fix: avoid error when grid value cannot be obtained

This commit is contained in:
Lance Edgar 2024-08-28 09:53:14 -05:00
parent b81914fbf5
commit 0b6cfaa9c5

View file

@ -575,7 +575,11 @@ class Grid(WuttaGrid):
return getattr(obj, column_name) return getattr(obj, column_name)
except AttributeError: except AttributeError:
pass pass
return obj[column_name]
try:
return obj[column_name]
except TypeError:
pass
def render_currency(self, obj, column_name): def render_currency(self, obj, column_name):
value = self.obtain_value(obj, column_name) value = self.obtain_value(obj, column_name)