diff --git a/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/service/template/impl/TaskTemplateServiceImpl.java b/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/service/template/impl/TaskTemplateServiceImpl.java index 7bd67ea2e7..9ba131eb76 100644 --- a/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/service/template/impl/TaskTemplateServiceImpl.java +++ b/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/service/template/impl/TaskTemplateServiceImpl.java @@ -608,8 +608,8 @@ public TaskTemplateInfoDTO deleteTaskTemplate(String username, Long appId, Long } } } + taskPlanService.deleteTaskPlanByTemplate(appId, templateId); } - taskPlanService.deleteTaskPlanByTemplate(appId, templateId); taskTemplateDAO.deleteTaskTemplateById(appId, templateId); tagService.batchDeleteResourceTags(appId, JobResourceTypeEnum.TEMPLATE.getValue(), String.valueOf(templateId)); return template;