From 5d21299443866a1ecfdc1ff92662d44ce09bd7a2 Mon Sep 17 00:00:00 2001 From: To-om Date: Tue, 10 Nov 2020 14:42:15 +0100 Subject: [PATCH] #1635 Fix computed propertied in dashboard --- thehive/app/org/thp/thehive/services/th3/Aggregation.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thehive/app/org/thp/thehive/services/th3/Aggregation.scala b/thehive/app/org/thp/thehive/services/th3/Aggregation.scala index 90032f84dc..358d5a744b 100644 --- a/thehive/app/org/thp/thehive/services/th3/Aggregation.scala +++ b/thehive/app/org/thp/thehive/services/th3/Aggregation.scala @@ -177,7 +177,7 @@ case class AggAvg(aggName: Option[String], fieldName: String) extends Aggregatio traversal: Traversal.Unk, authContext: AuthContext ): Traversal.Domain[Output[_]] = { - val fieldPath = FPath(fieldName) + val fieldPath = if (fieldName.startsWith("computed")) FPathElem(fieldName) else FPath(fieldName) val property = publicProperties .get[Traversal.UnkD, Traversal.UnkDU](fieldPath, traversalType) .getOrElse(throw BadRequestError(s"Property $fieldName for type $traversalType not found"))