From 310076bee6149411825be1d27db67162241a3194 Mon Sep 17 00:00:00 2001 From: To-om Date: Mon, 25 May 2020 13:59:03 +0200 Subject: [PATCH] #1356 Fix integer custom field --- .../main/scala/org/thp/thehive/dto/v0/CustomFieldValue.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dto/src/main/scala/org/thp/thehive/dto/v0/CustomFieldValue.scala b/dto/src/main/scala/org/thp/thehive/dto/v0/CustomFieldValue.scala index 195cf953f8..e9cf565699 100644 --- a/dto/src/main/scala/org/thp/thehive/dto/v0/CustomFieldValue.scala +++ b/dto/src/main/scala/org/thp/thehive/dto/v0/CustomFieldValue.scala @@ -39,7 +39,7 @@ object InputCustomFieldValue { obj.get("integer") match { case FUndefined => None case FNull => Some(Good(InputCustomFieldValue(name, None, obj.getNumber("order").map(_.toInt)))) - case FNumber(value) => Some(Good(InputCustomFieldValue(name, Some(value.toLong), obj.getNumber("order").map(_.toInt)))) + case FNumber(value) => Some(Good(InputCustomFieldValue(name, Some(value.toInt), obj.getNumber("order").map(_.toInt)))) case other => Some(Bad(One(InvalidFormatAttributeError(s"customField.$name.integer", "integer", Set.empty, other)))) }