diff --git a/internal/handler/v2/config/policy/config_delete_policy.go b/internal/handler/v2/config/policy/config_delete_policy.go index ceee922..71ec0b7 100644 --- a/internal/handler/v2/config/policy/config_delete_policy.go +++ b/internal/handler/v2/config/policy/config_delete_policy.go @@ -30,7 +30,7 @@ func ConfigDeletePolicy(w http.ResponseWriter, r *http.Request) { return } - currentRevision, err := revision.GetLatestByPolicyId(policyId) + currentRevision, err := revision.GetLatestByObjectIdAndSchemaName(policyId, config.Policy) if err != nil { m := fmt.Sprintf("Failed to fetch revisions: %v", policyId) common.HandleErrorV2(w, http.StatusInternalServerError, m, err)