Closed Greyvend closed 9 years ago
The problem you are facing is not with select_related
, instead, it is that current version of ParsePy does not deserialize arrays of objects.
I have proposed a pull request to fix the deserialization here: https://github.com/dgrtwo/ParsePy/pull/121, can you please test if the patch will fix your problem?
Thanks!
Also, the correct assertion is: assert hasattr(main_objects[0].related_objects[0], 'field1')
, since related_objects
field is an Array
in parse, and a list
in Python.
Yes, your change fixes it. Fortunately, @dgrtwo already merged it.
Perfect. Glad to help.
On Wed, Sep 30, 2015 at 2:36 AM, Serge Mosin notifications@github.com wrote:
Yes, your change fixes it. Fortunately, @dgrtwo https://github.com/dgrtwo already merged it.
— Reply to this email directly or view it on GitHub https://github.com/dgrtwo/ParsePy/issues/126#issuecomment-144286846.
Skype: felipeanl
Here is the snippet that demonstrates the problem.
So when using
select_related
method the specified attribute doesn't seem to be transformed from raw representation to Object.