Browse Source

fix: When a WorkSpaceNotAllowedCreateError occurs, may account is not defined (#11144)

Co-authored-by: 刘江波 <jiangbo721@163.com>
tags/1.2.0
jiangbo721 7 months ago
parent
commit
aa4c6874f1
No account linked to committer's email address
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      api/services/account_service.py

+ 2
- 0
api/services/account_service.py View File

@@ -913,6 +913,8 @@ class RegisterService:
db.session.commit()
except WorkSpaceNotAllowedCreateError:
db.session.rollback()
logging.exception("Register failed")
raise AccountRegisterError("Workspace is not allowed to create.")
except AccountRegisterError as are:
db.session.rollback()
logging.exception("Register failed")

Loading…
Cancel
Save