Skip to content

Commit

Permalink
#2135 Fix type to access cached flow items
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Jul 23, 2021
1 parent 3c1ad94 commit 8a0672a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions thehive/app/org/thp/thehive/services/FlowActor.scala
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ class FlowActor extends Actor {
case (id, organisations, cases) =>
organisations.foreach { organisation =>
val cacheKey = FlowId.toString(organisation, None)
val ids = cache.get[List[String]](cacheKey).getOrElse(Nil)
cache.set(cacheKey, (id :: ids).take(10))
val ids = cache.get[Seq[String]](cacheKey).getOrElse(Nil)
cache.set(cacheKey, (id +: ids).take(10))
cases.foreach { caseId =>
val cacheKey: String = FlowId.toString(organisation, Some(caseId))
val ids = cache.get[List[String]](cacheKey).getOrElse(Nil)
cache.set(cacheKey, (id :: ids).take(10))
val ids = cache.get[Seq[String]](cacheKey).getOrElse(Nil)
cache.set(cacheKey, (id +: ids).take(10))
}
}
}
Expand Down

0 comments on commit 8a0672a

Please sign in to comment.