diff --git a/thehive/app/org/thp/thehive/controllers/v1/AlertCtrl.scala b/thehive/app/org/thp/thehive/controllers/v1/AlertCtrl.scala index c520f10cde..968af3f663 100644 --- a/thehive/app/org/thp/thehive/controllers/v1/AlertCtrl.scala +++ b/thehive/app/org/thp/thehive/controllers/v1/AlertCtrl.scala @@ -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 } }