Fix default grid filter when "local" date times are involved

This commit is contained in:
Lance Edgar 2023-10-18 21:25:13 -05:00
parent 13565d1c45
commit 230a54cb99

View file

@ -652,7 +652,10 @@ class Grid(object):
elif isinstance(column.type, sa.Date):
factory = gridfilters.AlchemyDateFilter
elif isinstance(column.type, sa.DateTime):
factory = gridfilters.AlchemyDateTimeFilter
if self.assume_local_times:
factory = gridfilters.AlchemyLocalDateTimeFilter
else:
factory = gridfilters.AlchemyDateTimeFilter
elif isinstance(column.type, GPCType):
factory = gridfilters.AlchemyGPCFilter
kwargs['column'] = column