Error typechecking ManyToManyField manager request.user.groups.all()
#883
Labels
bug
Something isn't working
request.user.groups.all()
#883
Bug report
What's wrong
If I use
request.user.groups.all()
in a view (request being an instance ofdjango.http.HttpRequest
), this runs fine but mypy complains witherror: Item "ManyToManyField[Sequence[Group], RelatedManager[Group]]" of "Union[ManyToManyField[Sequence[Group], RelatedManager[Group]], EmptyManager]" has no attribute "all"
How is that should be
Typechecking should pass without errors.
System information
python
version: 3.9.10django
version: 4.0.2mypy
version: 0.910django-stubs
version: 1.9.0django-stubs-ext
version: 0.3.1The text was updated successfully, but these errors were encountered: