diff --git a/ScalliGraph b/ScalliGraph index acc3bea235..33fcd753fa 160000 --- a/ScalliGraph +++ b/ScalliGraph @@ -1 +1 @@ -Subproject commit acc3bea235989e57f8b43fd0780f6905437cc9e2 +Subproject commit 33fcd753fa102062ab54411fef169c847f1501db diff --git a/thehive/app/org/thp/thehive/services/AlertSrv.scala b/thehive/app/org/thp/thehive/services/AlertSrv.scala index 082fa64ee6..f18809bd4f 100644 --- a/thehive/app/org/thp/thehive/services/AlertSrv.scala +++ b/thehive/app/org/thp/thehive/services/AlertSrv.scala @@ -72,8 +72,8 @@ class AlertSrv @Inject() ( graph: Graph, authContext: AuthContext ): Try[RichAlert] = { - val alertAlreadyExist = organisationSrv.get(organisation).alerts.getBySourceId(alert.`type`, alert.source, alert.sourceRef).getCount - if (alertAlreadyExist > 0) + val alertAlreadyExist = startTraversal.getBySourceId(alert.`type`, alert.source, alert.sourceRef).organisation.current.exists + if (alertAlreadyExist) Failure(CreateError(s"Alert ${alert.`type`}:${alert.source}:${alert.sourceRef} already exist in organisation ${organisation.name}")) else for {