Merge pull request #5790 from yousong/automated-cherry-pick-of-#5789-upstream-release-3.1

Automated cherry pick of #5789: proxysetting: fix validating delete condition
This commit is contained in:
Zexi Li
2020-04-14 10:45:49 +08:00
committed by GitHub
+1 -2
View File
@@ -88,8 +88,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 {