diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/views.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/views.py index 942f3e3f..8bb1838c 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/views.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/views.py @@ -35,6 +35,8 @@ class UserUpdateView(LoginRequiredMixin, SuccessMessageMixin, UpdateView): return self.request.user.get_absolute_url() def get_object(self, queryset: QuerySet | None=None) -> User: + # for mypy to know that the user is authenticated + assert self.request.user.is_authenticated return self.request.user