Skip to content
This repository has been archived by the owner on Feb 20, 2022. It is now read-only.

Commit

Permalink
Fix the relatedTo operator in Query
Browse files Browse the repository at this point in the history
Before this we were never passing in all of the data required for the
relation lookup to work.

Figured this out after looking at the 4th code example at
https://parse.com/docs/rest#queries-relational and comparing to the
request that was actually being sent.

All the tests pass now.
  • Loading branch information
dgadling committed Oct 5, 2014
1 parent 7ec07d1 commit 37d0606
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion parse_rest/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def filter(self, **kw):
if operator is None:
q._where[attr] = parse_value
elif operator == 'relatedTo':
q._where['$' + operator] = parse_value
q._where['$' + operator] = {'object': parse_value, 'key': attr}
else:
if not isinstance(q._where[attr], dict):
q._where[attr] = {}
Expand Down

0 comments on commit 37d0606

Please sign in to comment.