From d241c999980a95b50a45def5134fa7645eff2748 Mon Sep 17 00:00:00 2001 From: Albin Antony Date: Fri, 5 Jan 2024 14:10:00 +0530 Subject: [PATCH] Fix #610 Fetch revisions by objectId and schemaName in config read policy --- internal/handler/v2/config/policy/config_read_policy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)