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
… draft consent record
  • Loading branch information
albinpa authored and georgepadayatti committed Jan 9, 2024
1 parent 8154359 commit 0a70206
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func ServiceCreateDraftConsentRecord(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.GetLatestByDataAgreementId(dataAgreementId)
rev, err = revision.GetLatestByObjectIdAndSchemaName(dataAgreementId, config.DataAgreement)
if err != nil {
m := fmt.Sprintf("Failed to fetch revision: %v", revisionId)
common.HandleErrorV2(w, http.StatusInternalServerError, m, err)
Expand Down

0 comments on commit 0a70206

Please sign in to comment.