Skip to content

Conversation

BenBlumer
Copy link
Contributor

Django Rest Framework allows users to set the queryset by overriding the get_queryset method.

However, just reading the queryset attribute bypasses that. As a result, users will get 404 errors if they've overridden the get_queryset method instead of setting the class variable queryset.

[Django Rest Framework allows users to set the queryset by overriding the get_queryset method.](https://www.django-rest-framework.org/api-guide/filtering/)

However, just reading the queryset attribute bypasses that. As a result, users will get 404 errors if they've overridden the get_queryset method instead of setting the class variable queryset.
Copy link
Owner

@vertliba vertliba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point, thank you!

@vertliba vertliba merged commit 7c2bd0e into vertliba:master Jun 10, 2022
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

Successfully merging this pull request may close these issues.

3 participants