From 95b682746e82010651957bc90d1b498e270c3e3a Mon Sep 17 00:00:00 2001 From: To-om Date: Tue, 21 Apr 2020 13:37:36 +0200 Subject: [PATCH] #1271 remove old impact status before set a new one --- thehive/app/org/thp/thehive/services/CaseSrv.scala | 1 + 1 file changed, 1 insertion(+) diff --git a/thehive/app/org/thp/thehive/services/CaseSrv.scala b/thehive/app/org/thp/thehive/services/CaseSrv.scala index 3098861539..e271b2af2b 100644 --- a/thehive/app/org/thp/thehive/services/CaseSrv.scala +++ b/thehive/app/org/thp/thehive/services/CaseSrv.scala @@ -219,6 +219,7 @@ class CaseSrv @Inject() ( `case`: Case with Entity, impactStatus: ImpactStatus with Entity )(implicit graph: Graph, authContext: AuthContext): Try[Unit] = { + get(`case`).unsetImpactStatus() caseImpactStatusSrv.create(CaseImpactStatus(), `case`, impactStatus) auditSrv.`case`.update(`case`, Json.obj("impactStatus" -> impactStatus.value)) }