Commit 3a9c7579 authored by John Wang's avatar John Wang

fix: CurrentPasswordIncorrectError not return with error msg

parent b8620f9a
...@@ -6,6 +6,7 @@ from flask import current_app, request ...@@ -6,6 +6,7 @@ from flask import current_app, request
from flask_login import login_required, current_user from flask_login import login_required, current_user
from flask_restful import Resource, reqparse, fields, marshal_with from flask_restful import Resource, reqparse, fields, marshal_with
from services.errors.account import CurrentPasswordIncorrectError as ServiceCurrentPasswordIncorrectError
from controllers.console import api from controllers.console import api
from controllers.console.setup import setup_required from controllers.console.setup import setup_required
from controllers.console.workspace.error import AccountAlreadyInitedError, InvalidInvitationCodeError, \ from controllers.console.workspace.error import AccountAlreadyInitedError, InvalidInvitationCodeError, \
...@@ -197,7 +198,7 @@ class AccountPasswordApi(Resource): ...@@ -197,7 +198,7 @@ class AccountPasswordApi(Resource):
try: try:
AccountService.update_account_password( AccountService.update_account_password(
current_user, args['password'], args['new_password']) current_user, args['password'], args['new_password'])
except api.services.errors.account.CurrentPasswordIncorrectError: except ServiceCurrentPasswordIncorrectError:
raise CurrentPasswordIncorrectError() raise CurrentPasswordIncorrectError()
return {"result": "success"} return {"result": "success"}
......
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