Commit bcbce7c7 by David Robinson

Merge pull request #73 from Tibabal/patch-1

Update datatypes.py to handle dict on properties
parents b7974f42 aae6c023
...@@ -70,7 +70,12 @@ class ParseType(object): ...@@ -70,7 +70,12 @@ class ParseType(object):
if (hasattr(python_object, '__iter__') and if (hasattr(python_object, '__iter__') and
not isinstance(python_object, (six.string_types[0], ParseType))): not isinstance(python_object, (six.string_types[0], ParseType))):
# It's an iterable? Repeat this whole process on each object # It's an iterable? Repeat this whole process on each object
return [ParseType.convert_to_parse(o, as_pointer=as_pointer) if isinstance(python_object, dict):
for key, value in python_object.iteritems():
python_object[key]=ParseType.convert_to_parse(value, as_pointer=as_pointer)
return python_object
else:
return [ParseType.convert_to_parse(o, as_pointer=as_pointer)
for o in python_object] for o in python_object]
if python_type in transformation_map: if python_type in transformation_map:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment