From 51d633c956a05ab4d55ebf06124df121a74e89e0 Mon Sep 17 00:00:00 2001 From: Yousong Zhou Date: Mon, 13 Apr 2020 15:28:37 +0800 Subject: [PATCH] proxysetting: fix validating delete condition --- pkg/cloudcommon/db/proxy/proxysetting.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/cloudcommon/db/proxy/proxysetting.go b/pkg/cloudcommon/db/proxy/proxysetting.go index ccd5893e67..d7121f3d77 100644 --- a/pkg/cloudcommon/db/proxy/proxysetting.go +++ b/pkg/cloudcommon/db/proxy/proxysetting.go @@ -110,8 +110,7 @@ func (ps *SProxySetting) ValidateDeleteCondition(ctx context.Context) error { return httperrors.NewConflictError("DIRECT setting cannot be deleted") } for _, man := range referrersMen { - t := man.TableSpec().Instance() - n, err := t.Query(). + n, err := man.Query(). Equals("proxy_setting_id", ps.Id). CountWithError() if err != nil {