Commit b7fb7947 by Dave Gadling

Make Query.filter(foo__in=[list_of_Objects]) work

Basically, if we're asked to convert_to_parse a list, do it for
everything in the list and return the list.

All of the tests pass now, so I don't believe anything has been harmed
in this change.
parent e907a235
......@@ -60,6 +60,11 @@ class ParseType(object):
ParseResource: Pointer
}
if hasattr(python_object, '__iter__'):
# It's an iterable? Repeat this whole process on each object
return [ParseType.convert_to_parse(o, as_pointer=as_pointer)
for o in python_object]
if python_type in transformation_map:
klass = transformation_map.get(python_type)
return klass(python_object)._to_native()
......
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