milesrichardson / ParsePy

A relatively up-to-date fork of ParsePy, the Python wrapper for the Parse.com API. Originally maintained by @dgrtwo
MIT License
515 stars 184 forks source link

=Pointer is initialized with obj #35

Closed maikroeder closed 8 years ago

maikroeder commented 10 years ago

I happen to have tested an object I retrieved from Parse doing this simple trick:

for attr in dir(profile):
    print attr; 
    print getattr(profile, attr)

That's how I stumbled on the initialization problem in the as_pointer attribute. Hope this helps.

dgrtwo commented 10 years ago

This is certainly a bug (thanks!) but I think I'm unclear how this fixes it. As this would initialize _object as a dictionary, lines like 'objectId': self._object.objectId in _to_native would break (as the dictionary has an objectId key but not an attribute). Am I mistaken?

(I'm also having a hard time thinking of a way to test this specifically)