diff --git a/OpenOversight/app/utils/db.py b/OpenOversight/app/utils/db.py index 2a12263fa..32c491e36 100644 --- a/OpenOversight/app/utils/db.py +++ b/OpenOversight/app/utils/db.py @@ -101,6 +101,10 @@ class CustomJSONEncoder(JSONEncoder): """ def default(self, obj): - if isinstance(obj, (date, time, datetime)): + if isinstance(obj, (date, datetime)): return obj.isoformat() + + if isinstance(obj, time): + return obj.strftime("%T") + return super().default(obj)