From 152a2ff9c1f9a5420144579a4be20ba8949d0da9 Mon Sep 17 00:00:00 2001 From: Albin Antony Date: Fri, 5 Jan 2024 14:22:42 +0530 Subject: [PATCH] Fix #610 Fetch revisions by objectId and schemaName in service read dataagreement --- internal/handler/v2/service/service_read_dataagreement.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/handler/v2/service/service_read_dataagreement.go b/internal/handler/v2/service/service_read_dataagreement.go index 179da5a..5051e7a 100644 --- a/internal/handler/v2/service/service_read_dataagreement.go +++ b/internal/handler/v2/service/service_read_dataagreement.go @@ -37,7 +37,7 @@ func ServiceReadDataAgreement(w http.ResponseWriter, r *http.Request) { } var revisionResp revision.Revision - revisionResp, err = revision.GetLatestByDataAgreementId(da.Id) + revisionResp, err = revision.GetLatestByObjectIdAndSchemaName(da.Id, config.DataAgreement) if err != nil { m := fmt.Sprintf("Failed to fetch revision: %v", dataAgreementId) common.HandleErrorV2(w, http.StatusInternalServerError, m, err)