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

add view in context for order filter #9216

Closed
wants to merge 3 commits into from

Conversation

masarliev
Copy link

view is missing in context when using OrderingFilter

Copy link
Member

@auvipy auvipy left a comment

Choose a reason for hiding this comment

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

I can see another view here queryset, view, {'request': request}), would you mind sharing more detail, please? also the tests are failing

@masarliev
Copy link
Author

I can see another view here queryset, view, {'request': request}), would you mind sharing more detail, please? also the tests are failing

added some tests. Without this change self.context in get_field_names and may be other places throws KeyError exeption for missing 'view'

@masarliev masarliev requested a review from auvipy January 30, 2024 09:44
@tomchristie
Copy link
Member

"view is missing in context when using OrderingFilter" isn't a sufficient justification for changing the behaviour here. Even minor changes like this might introduce alterations in our users test cases, and cause unneccessary busy-work all round.

This looks like it might potentially be an okay kind of minor change, but we should have a much higher bar for acceptance.

Ie... a discussion phase where someone has demonstrated that this is more consistent with other places we're passing context around.

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