From ab050bf589decebe043bf560ae54fa4e552e1b71 Mon Sep 17 00:00:00 2001 From: pycook <pycook@126.com> Date: Tue, 9 Jan 2024 10:04:07 +0800 Subject: [PATCH] fix(api): cmdb-init-acl commands --- cmdb-api/api/commands/click_cmdb.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmdb-api/api/commands/click_cmdb.py b/cmdb-api/api/commands/click_cmdb.py index e7ad1ea..54c8c91 100644 --- a/cmdb-api/api/commands/click_cmdb.py +++ b/cmdb-api/api/commands/click_cmdb.py @@ -115,6 +115,8 @@ def cmdb_init_acl(): _app = AppCache.get('cmdb') or App.create(name='cmdb') app_id = _app.id + current_app.test_request_context().push() + # 1. add resource type for resource_type in ResourceTypeEnum.all(): try: