From d4cf00cdfeb014fbec2102cf2ed4ed96db4403ee Mon Sep 17 00:00:00 2001 From: Albin Antony Date: Fri, 5 Jan 2024 14:08:38 +0530 Subject: [PATCH] Fix #610 Fetch revisions by objectId and schemaName in config list policy revisions --- .../handler/v2/config/policy/config_list_policy_revisions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/handler/v2/config/policy/config_list_policy_revisions.go b/internal/handler/v2/config/policy/config_list_policy_revisions.go index c437cdc..a959132 100644 --- a/internal/handler/v2/config/policy/config_list_policy_revisions.go +++ b/internal/handler/v2/config/policy/config_list_policy_revisions.go @@ -47,7 +47,7 @@ func ConfigListPolicyRevisions(w http.ResponseWriter, r *http.Request) { return } - revisions, err := revision.ListAllByPolicyId(policyId) + revisions, err := revision.ListAllByObjectIdAndSchemaName(policyId, config.Policy) if err != nil { m := fmt.Sprintf("Failed to fetch revision: %v", policyId) common.HandleErrorV2(w, http.StatusInternalServerError, m, err)