Skip to content

Commit

Permalink
cleanup redundancy
Browse files Browse the repository at this point in the history
  • Loading branch information
aiscenblue committed Apr 22, 2018
1 parent 7e9e6de commit 1319c4c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions mongoengine_serialize/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,7 @@ def __filter_serialize(self, collections, raw):
raw_collection = getattr(raw, self.__get_raw_name(key), collection)
if isinstance(value, list) or isinstance(value, dict):
re_serialize = Serialize(raw_collection).jsonify()
if isinstance(re_serialize, tuple):
new_key, new_value = Serialize(raw_collection).jsonify()
new_collection.update(dict.fromkeys((new_key,), new_value))
else:
new_collection.update(dict.fromkeys((key, ), re_serialize))
new_collection.update(dict.fromkeys((key,), re_serialize))
else:
new_collection.update(self.__serialize(key, value, raw_collection))
return new_collection
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='mongoengine-serialize',
version='1.2.2',
version='1.2.3',
description='Mongoengine serializer',
author='Jeffrey Marvin Forones',
author_email='aiscenblue@gmail.com',
Expand Down

0 comments on commit 1319c4c

Please sign in to comment.