Skip to content

Commit

Permalink
fix: remove the installation app relationship after the last component
Browse files Browse the repository at this point in the history
  • Loading branch information
曲源成 committed Aug 9, 2023
1 parent a8ca867 commit 712f5aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion console/services/app_actions/app_manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ def truncate_service(self, tenant, service, user=None, app=None):
# 如果这个组件属于模型安装应用, 则删除最后一个组件后同时删除安装应用关系。
if service.tenant_service_group_id > 0:
count = service_repo.get_services_by_service_group_id(service.tenant_service_group_id).count()
if count <= 1:
if not count:
tenant_service_group_repo.delete_tenant_service_group_by_pk(service.tenant_service_group_id)

return 200, "success"
Expand Down

0 comments on commit 712f5aa

Please sign in to comment.