From c3ccba2936972c26f69da12796eff7561272de26 Mon Sep 17 00:00:00 2001 From: Albin Antony Date: Fri, 5 Jan 2024 14:06:08 +0530 Subject: [PATCH] Fix #610 Fetch revisions by objectId and schemaName in config read dataagreement --- .../v2/config/dataagreement/config_read_dataagreement.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/handler/v2/config/dataagreement/config_read_dataagreement.go b/internal/handler/v2/config/dataagreement/config_read_dataagreement.go index 1637f63..7afe03f 100644 --- a/internal/handler/v2/config/dataagreement/config_read_dataagreement.go +++ b/internal/handler/v2/config/dataagreement/config_read_dataagreement.go @@ -64,7 +64,7 @@ func ConfigReadDataAgreement(w http.ResponseWriter, r *http.Request) { // If data agreement is published then: // a. Fetch latest revision if da.Active { - rev, err = revision.GetLatestByDataAgreementId(dataAgreementId) + rev, err = revision.GetLatestByObjectIdAndSchemaName(dataAgreementId, config.DataAgreement) if err != nil { m := fmt.Sprintf("Failed to fetch revision: %v", dataAgreementId) common.HandleErrorV2(w, http.StatusBadRequest, m, err)