Merge pull request #3070 from arnav13081994/make_tests_dryer

This commit is contained in:
Bruno Alla 2021-03-05 09:09:21 +00:00 committed by GitHub
commit 03f54fa276
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,7 +25,7 @@ class UserUpdateView(LoginRequiredMixin, SuccessMessageMixin, UpdateView):
success_message = _("Information successfully updated")
def get_success_url(self):
return reverse("users:detail", kwargs={"username": self.request.user.username})
return self.request.user.get_absolute_url() # type: ignore [union-attr]
def get_object(self):
return self.request.user