fix(common): fix 'ACLManager' object has no attribute 'create_app' (#217)

This commit is contained in:
Evan Sung
2023-10-20 22:38:19 -05:00
committed by GitHub
parent 6503d32e6e
commit 6ff77a140c
2 changed files with 12 additions and 7 deletions

View File

@@ -216,10 +216,9 @@ class InitDepartment(object):
)
try:
app = acl.validate_app()
if app:
return acl
acl.create_app(payload)
if not app:
acl.create_app(payload)
return acl
except Exception as e:
current_app.logger.error(e)
if '不存在' in str(e):