Compare commits

...

2 Commits

Author SHA1 Message Date
yong.huang 5e2bedfb37 chore: release v2.5.1 2025-02-10 20:02:51 +08:00
yong.huang fb19353c70 fix(api): get citype 2025-02-10 19:55:20 +08:00
2 changed files with 9 additions and 5 deletions

View File

@ -64,9 +64,13 @@ class CITypeView(APIView):
ci_type['unique_name'] = ci_type['unique_id'] and AttributeCache.get(ci_type['unique_id']).name
ci_types.append(ci_type)
elif type_name is not None:
ci_type = CITypeCache.get(type_name).to_dict()
ci_type = CITypeCache.get(type_name)
if ci_type is not None:
ci_type = ci_type.to_dict()
ci_type['parent_ids'] = CITypeInheritanceManager.get_parents(ci_type['id'])
ci_types = [ci_type]
else:
ci_types = []
else:
ci_types = CITypeManager().get_ci_types(q)
count = len(ci_types)

View File

@ -41,7 +41,7 @@ services:
- redis
cmdb-api:
image: registry.cn-hangzhou.aliyuncs.com/veops/cmdb-api:2.4.17
image: registry.cn-hangzhou.aliyuncs.com/veops/cmdb-api:2.5.1
container_name: cmdb-api
env_file:
- .env
@ -84,7 +84,7 @@ services:
test: "ps aux|grep -v grep|grep -v '1 root'|grep gunicorn || exit 1"
cmdb-ui:
image: registry.cn-hangzhou.aliyuncs.com/veops/cmdb-ui:2.4.17
image: registry.cn-hangzhou.aliyuncs.com/veops/cmdb-ui:2.5.1
container_name: cmdb-ui
depends_on:
cmdb-api: