Skip to content

Commit

Permalink
#105: Use method
Browse files Browse the repository at this point in the history
  • Loading branch information
keiranjprice101 committed Oct 24, 2019
1 parent d294df4 commit b78d251
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/models/db_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit b78d251

Please sign in to comment.