Skip to content

Commit

Permalink
Fix #610 Fetch revisions by objectId and schemaName in service create…
Browse files Browse the repository at this point in the history
… dataagreement record
  • Loading branch information
albinpa authored and georgepadayatti committed Jan 9, 2024
1 parent 42106c4 commit 8154359
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func ServiceCreateDataAgreementRecord(w http.ResponseWriter, r *http.Request) {

// If revision id is missing, fetch latest revision
if err != nil && errors.Is(err, daRecord.RevisionIdIsMissingError) {
rev, err = revision.GetLatestByObjectId(dataAgreementId)
rev, err = revision.GetLatestByObjectIdAndSchemaName(dataAgreementId, config.DataAgreement)
if err != nil {
m := fmt.Sprintf("Failed to fetch revision for data agreement: %v", dataAgreementId)
common.HandleErrorV2(w, http.StatusInternalServerError, m, err)
Expand Down

0 comments on commit 8154359

Please sign in to comment.