Skip to content

Commit

Permalink
#1557 PR review changes 2
Browse files Browse the repository at this point in the history
  • Loading branch information
rriclet authored and To-om committed Oct 27, 2020
1 parent 8fc7b19 commit 4a1999c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions thehive/app/org/thp/thehive/services/AlertSrv.scala
Original file line number Diff line number Diff line change
Expand Up @@ -283,15 +283,15 @@ class AlertSrv @Inject() (
_ <- caseSrv.addTags(`case`, get(alert).tags.toSeq.map(_.toString).toSet)
// No audit for markAsRead and observables
// Audits for customFields, description and tags
newDescription <- Try(caseSrv.get(`case`).richCase.head.description)
c <- caseSrv.getOrFail(`case`._id)
details <- Success(Json.obj(
"customFields" -> get(alert).richCustomFields.toSeq.map(_.toOutput.toJson),
"description" -> newDescription,
"description" -> c.description,
"tags" -> caseSrv.get(`case`).tags.toSeq.map(_.toString))
)
} yield details
} (details => auditSrv.alertToCase.merge(alert, `case`, Some(details)))
.flatMap(_ => caseSrv.get(`case`).getOrFail("Case"))
.flatMap(_ => caseSrv.getOrFail(`case`._id))
}

def importObservables(alert: Alert with Entity, `case`: Case with Entity)(implicit
Expand Down

0 comments on commit 4a1999c

Please sign in to comment.