Commit 8199ea84 authored by ibuler's avatar ibuler

[Bugfix] 修复有时导致的token解析失败

parent 0e00451e
...@@ -291,7 +291,7 @@ class UserResetPasswordView(TemplateView): ...@@ -291,7 +291,7 @@ class UserResetPasswordView(TemplateView):
template_name = 'users/reset_password.html' template_name = 'users/reset_password.html'
def get(self, request, *args, **kwargs): def get(self, request, *args, **kwargs):
token = request.GET.get('token') token = request.GET.get('token', '')
user = User.validate_reset_token(token) user = User.validate_reset_token(token)
if not user: if not user:
kwargs.update({'errors': _('Token invalid or expired')}) kwargs.update({'errors': _('Token invalid or expired')})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment