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

Treat QuerySet.alias like QuerySet.annotate #2411

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

andersk
Copy link
Contributor

@andersk andersk commented Oct 20, 2024

Although this incorrectly allows some misuses of alias that only work at runtime with annotate, that is better than incorrectly forbidding all uses of alias.

Although this incorrectly allows some misuses of `alias` that only
work at runtime with `annotate`, that is better than incorrectly
forbidding all uses of `alias`.

Fixes typeddjango#2302.

Signed-off-by: Anders Kaseorg <[email protected]>
Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

Thanks! Further improvements of alias() are welcome!

@sobolevn sobolevn merged commit b7f43dd into typeddjango:master Oct 21, 2024
38 checks passed
@andersk andersk deleted the alias branch October 21, 2024 09:00
@andersk andersk restored the alias branch October 21, 2024 09:01
@andersk andersk deleted the alias branch October 21, 2024 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

[5.0.3 regression] Can’t filter a QuerySet on an alias
2 participants