From 3dc6c09d73b07cb9f52fc2b2202f769a87bb1c59 Mon Sep 17 00:00:00 2001 From: simonzhangsz <15231584+simonzhangsz@user.noreply.gitee.com> Date: Fri, 13 Dec 2024 11:11:34 +0800 Subject: [PATCH] fix: custom indicator exist issue --- features/pm/kpi_c_title/controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/pm/kpi_c_title/controller.go b/features/pm/kpi_c_title/controller.go index 1aadbcd7..8b66cd33 100644 --- a/features/pm/kpi_c_title/controller.go +++ b/features/pm/kpi_c_title/controller.go @@ -174,7 +174,7 @@ func (k *KpiCTitle) Post(c *gin.Context) { } userName := ctx.LoginUserToUserName(c) title.CreatedBy = &userName - result := dborm.DefaultDB().Where("ne_type=? and (kpi_id=? or title=?)", title.NeType, title.KpiID, title.Title).First(&title) + result := dborm.DefaultDB().Where("ne_type=? and (kpi_id=? or title=?) and stauts!='Deleted'", title.NeType, title.KpiID, title.Title).First(&title) if result.RowsAffected > 0 { c.JSON(http.StatusOK, services.ErrResp("custom indicator already exist")) return