8000 3.15 not backwards compatible with 3.14 - "View' should either include a `queryset` attribute, or override the `get_queryset()` method." · Issue #9306 · encode/django-rest-framework · GitHub
[go: up one dir, main page]

Skip to content
3.15 not backwards compatible with 3.14 - "View' should either include a queryset attribute, or override the get_queryset() method." #9306
Closed
@mrzorn

Description

@mrzorn

In 3.14, if a view was not a list view, and it overrode the get_object method, the view did not have to specify the queryset attribute or override the get_queryset() method.

In these cases, the queryset is not needed or used. However, in 3.15 an AssertionError is now thrown in this case. Was this intentional?

This appears to be related to the following call in the UpdateModelMixin which was recently added: queryset = self.filter_queryset(self.get_queryset())

Upgrading to 3.15 introduces a breaking change that could be missed by many, especially as I see no reference to it in the release notes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0