proxysetting: fix validating delete condition

This commit is contained in:
Yousong Zhou
2020-04-13 16:29:12 +08:00
parent 266a3bd043
commit 51d633c956
+1 -2
View File
@@ -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 {