Skip to content

Commit

Permalink
#2232 Fix broken link between case and alert during migration
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Oct 29, 2021
1 parent 7553678 commit 5372384
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,7 @@ class Output @Inject() (
for {
organisation <- getOrganisation(inputAlert.organisation)
createdAlert <- alertSrv.createEntity(inputAlert.alert.copy(organisationId = organisation._id, caseId = `case`.fold(EntityId.empty)(_._id)))
_ <- `case`.map(alertSrv.alertCaseSrv.create(AlertCase(), createdAlert, _)).flip
tags = inputAlert.alert.tags.flatMap(getTag(_, organisation._id.value).toOption)
_ = updateMetaData(createdAlert, inputAlert.metaData)
_ <- alertSrv.alertOrganisationSrv.create(AlertOrganisation(), createdAlert, organisation)
Expand Down

0 comments on commit 5372384

Please sign in to comment.