admin: fix error when creating password-reset link
This commit is contained in:
parent
49397cef70
commit
92c0ad4154
|
@ -155,7 +155,7 @@ class UserPasswordResetView(LoginRequiredMixin, PermissionRequiredMixin, DetailV
|
||||||
def get(self, request: HttpRequest, *args, **kwargs) -> HttpResponse:
|
def get(self, request: HttpRequest, *args, **kwargs) -> HttpResponse:
|
||||||
"""Create token for user and return link"""
|
"""Create token for user and return link"""
|
||||||
super().get(request, *args, **kwargs)
|
super().get(request, *args, **kwargs)
|
||||||
token, _ = Token.objects.get_or_create(
|
token, __ = Token.objects.get_or_create(
|
||||||
identifier="password-reset-temp", user=self.object
|
identifier="password-reset-temp", user=self.object
|
||||||
)
|
)
|
||||||
querystring = urlencode({"token": token.key})
|
querystring = urlencode({"token": token.key})
|
||||||
|
|
Reference in New Issue