diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/views.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/views.py index 520b1e52..f3a240d8 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/views.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/views.py @@ -27,7 +27,7 @@ class UserUpdateView(LoginRequiredMixin, UpdateView): return reverse("users:detail", kwargs={"username": self.request.user.username}) def get_object(self): - return User.objects.get(username=self.request.user.username) + return self.request.user def form_valid(self, form): messages.add_message(