diff --git a/common/models/db_models.py b/common/models/db_models.py index 223709c4..23b45696 100644 --- a/common/models/db_models.py +++ b/common/models/db_models.py @@ -52,7 +52,7 @@ def to_dict(self): dictionary = {} for column in self.__table__.columns: attribute = getattr(self, column.name) - dictionary[column.name] = str(attribute) if isinstance(attribute, datetime) else attribute + dictionary[column.name] = self._make_serializable(attribute) return dictionary def _make_serializable(self, field):