Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes: Fetching relationships fetches all existing resources #509

Merged
merged 3 commits into from
Mar 30, 2016
Merged

Fixes: Fetching relationships fetches all existing resources #509

merged 3 commits into from
Mar 30, 2016

Conversation

rezun
Copy link
Contributor

@rezun rezun commented Mar 30, 2016

When trying to fetch relationships via /resource//relation_name/ all existing resources of the relation type are returned. Not only those related to the resource.
I debugged this and I think that I found the potential bug.
The filter() method returns a new query object which was thrown away.
Also, the "in" operator doesn't seem to work on InstrumentedAttribute. So I changed it to use the in_() method.

@jfinkels jfinkels added the bug label Mar 30, 2016
@jfinkels
Copy link
Owner

Fantastic! This needs two unit tests still, one for fetching only those resources related to a resource and one for an InstrumentedAttribute.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 97.976% when pulling aa268e9 on Rezun:fix-fetching-relationships into 7423b8b on jfinkels:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 97.976% when pulling ed2767f on Rezun:fix-fetching-relationships into 7423b8b on jfinkels:master.

@jfinkels
Copy link
Owner

(I just disabled the commenting by the Coveralls robot, so those won't appear anymore.)

The build error seems to be an external issue, I'll restart the build to double check. Thanks for adding the tests.

@jfinkels jfinkels merged commit 1e560e4 into jfinkels:master Mar 30, 2016
@jfinkels
Copy link
Owner

Thanks for finding the holes in the existing tests instead of writing new ones!

@rezun rezun deleted the fix-fetching-relationships branch March 31, 2016 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants