aboutsummaryrefslogtreecommitdiff
path: root/ihatemoney/utils.py
diff options
context:
space:
mode:
authorByron Ullauri <Ullauri.Byron@gmail.com>2018-12-26 13:07:09 -0500
committerAlexis Metaireau <alexis@notmyidea.org>2018-12-26 19:07:09 +0100
commit7cb339c0bb8aacaeae47838a68c7af60cf414618 (patch)
tree9b404ea1b24d27af890daf26ecaa4604ac925678 /ihatemoney/utils.py
parent620596e32cbacac62d79d1a9f82cd57136b95b52 (diff)
downloadihatemoney-mirror-7cb339c0bb8aacaeae47838a68c7af60cf414618.zip
ihatemoney-mirror-7cb339c0bb8aacaeae47838a68c7af60cf414618.tar.gz
ihatemoney-mirror-7cb339c0bb8aacaeae47838a68c7af60cf414618.tar.bz2
Resolve "Update API project list" (#409)
* refactoring models _to_serialize property * updated project api members list * addressing flake8: line too long
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: