Skip to content

Commit

Permalink
#2250 Update caseId when alert is imported
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Nov 19, 2021
1 parent 196256f commit 4fc5ded
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions thehive/app/org/thp/thehive/controllers/v1/AlertCtrl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ class AlertCtrl @Inject() (
_ <- if (alertSrv.get(alert).`case`.exists) Failure(BadRequestError("The alert is already linked to a case")) else Success(())
c <- caseSrv.getOrFail(EntityName(caseNumber))
_ <- alertSrv.alertCaseSrv.create(AlertCase(), alert, c)
_ <- alertSrv.get(alert).update(_.caseId, c._id).getOrFail("Alert")
} yield Results.NoContent
}
}

0 comments on commit 4fc5ded

Please sign in to comment.