Skip to content

Commit

Permalink
#1247 Fix failure when the requested case is not in the current user …
Browse files Browse the repository at this point in the history
…organisation
  • Loading branch information
To-om committed Mar 4, 2020
1 parent b2e8a90 commit 9171170
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions thehive/app/org/thp/thehive/controllers/v0/CaseRenderer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,16 @@ trait CaseRenderer {
_.project(
_.apply(
By(
new CaseSteps(__[Vertex])
.share
.project(
_.apply(By(taskStats(__[Vertex])))
.and(By(observableStats(__[Vertex])))
)
.raw
__[Vertex].coalesce(
new CaseSteps(_)
.share
.project(
_.apply(By(taskStats(__[Vertex])))
.and(By(observableStats(__[Vertex])))
)
.raw,
_.constant(JsObject.empty -> JsObject.empty)
)
)
).and(By(alertStats(__[Vertex])))
.and(By(mergeFromStats(__[Vertex])))
Expand Down

0 comments on commit 9171170

Please sign in to comment.