Skip to content

Commit

Permalink
feat: register service WorkSpaceNotAllowedCreateError
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhouhaoJiang committed Sep 10, 2024
1 parent 4893631 commit 3f954e2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/services/account_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,9 @@ def register(
tenant_was_created.send(tenant)

db.session.commit()
except WorkSpaceNotAllowedCreateError:
db.session.rollback()
raise
except Exception as e:
db.session.rollback()
logging.error(f"Register failed: {e}")
Expand Down

0 comments on commit 3f954e2

Please sign in to comment.