diff --git a/internal/handler/v2/config/policy/config_read_policy.go b/internal/handler/v2/config/policy/config_read_policy.go index c2ffb95..f61a300 100644 --- a/internal/handler/v2/config/policy/config_read_policy.go +++ b/internal/handler/v2/config/policy/config_read_policy.go @@ -51,7 +51,7 @@ func ConfigReadPolicy(w http.ResponseWriter, r *http.Request) { } } else { - revisionResp, err = revision.GetLatestByPolicyId(policyId) + revisionResp, err = revision.GetLatestByObjectIdAndSchemaName(policyId, config.Policy) if err != nil { m := fmt.Sprintf("Failed to fetch revision: %v", policyId) common.HandleErrorV2(w, http.StatusInternalServerError, m, err)