aboutsummaryrefslogtreecommitdiff
path: root/ihatemoney/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'ihatemoney/utils.py')
-rw-r--r--ihatemoney/utils.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/ihatemoney/utils.py b/ihatemoney/utils.py
index 19340df..ec22834 100644
--- a/ihatemoney/utils.py
+++ b/ihatemoney/utils.py
@@ -192,11 +192,7 @@ class IhmJSONEncoder(JSONEncoder):
Taken from the deprecated flask-rest package."""
def default(self, o):
if hasattr(o, "_to_serialize"):
- # build up the object
- data = {}
- for attr in o._to_serialize:
- data[attr] = getattr(o, attr)
- return data
+ return o._to_serialize
elif hasattr(o, "isoformat"):
return o.isoformat()
else: