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

Getting duplicate results on a filter across multiple fields. Cannot add distinct. #187

Open
paulsermon-gemfair opened this issue Aug 19, 2022 · 0 comments

Comments

@paulsermon-gemfair
Copy link

As stated, I am adding a filter field that crosses 3 foreign keys. eg Filtering a TrainingSession object on attendees__user__roles__office

When I filter with this method I get duplicate results in my GQL response. Usually as many duplicates as there are attendees.
The obvious fix for this in Django is to add .distinct() to the queryset, but it seems overriding get_queryset, or setting the queryset value on the list object type doesn't do anything.

Any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant