fix pep8
This commit is contained in:
@@ -212,15 +212,13 @@ def password_change_request_handler(request):
|
||||
email =\
|
||||
user.email if user.is_authenticated() else request.POST.get('email')
|
||||
|
||||
error_message =\
|
||||
_("Some error occured during password change. Please try again")
|
||||
|
||||
if email:
|
||||
status_response = change_password(request, email)
|
||||
if status_response == 500:
|
||||
return\
|
||||
HttpResponse(
|
||||
_("Some error occured during password change. Please try "
|
||||
"again"),
|
||||
status=status_response
|
||||
)
|
||||
return HttpResponse(error_message, status=status_response)
|
||||
elif status_response == 403:
|
||||
return HttpResponseForbidden()
|
||||
|
||||
@@ -615,8 +613,6 @@ class RecoverPasswordView(views.APIView):
|
||||
HttpResponse: 405 if using an unsupported HTTP method
|
||||
"""
|
||||
|
||||
http_method_names = ["post"]
|
||||
|
||||
def post(self, request, format=None):
|
||||
"""
|
||||
Makes the request to change the password
|
||||
|
||||
Reference in New Issue
Block a user