Skip to content

Conversation

@flaeppe
Copy link
Member

@flaeppe flaeppe commented Jul 25, 2024

I noticed that we should check some methods on both Manager and QuerySet since the Manager class is a bit special as it is a type "merged" from BaseManager and QuerySet.

@sobolevn I think this could be a nice addition before releasing 5.0.3, or what do you think?

Thinking that the use cases from the test included here aren't too foreign:

MyModel.objects.filter(id=1).filter(invalid=1)
MyModel.objects.filter(id=1).get(invalid=1)
MyModel.objects.filter(id=1).exclude(invalid=1)
MyModel.objects.filter(id=1).create(invalid=1)

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, very good usecase.

@flaeppe flaeppe merged commit a28717d into typeddjango:master Jul 26, 2024
@flaeppe flaeppe deleted the fix/check-filtering-methods branch July 28, 2024 07:18
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.

2 participants