diff --git a/thehive/app/org/thp/thehive/services/CaseSrv.scala b/thehive/app/org/thp/thehive/services/CaseSrv.scala index dade050113..d2e2e0c88f 100644 --- a/thehive/app/org/thp/thehive/services/CaseSrv.scala +++ b/thehive/app/org/thp/thehive/services/CaseSrv.scala @@ -249,7 +249,7 @@ class CaseSrv @Inject() ( )(implicit graph: Graph, authContext: AuthContext): Try[RichCustomField] = for { cf <- customFieldSrv.getOrFail(customFieldIdOrName) - ccf <- CustomFieldType.map(cf.`type`).setValue(CaseCustomField(), customFieldValue).map(_.order_=(order)) + ccf <- CustomFieldType.map(cf.`type`).setValue(CaseCustomField().order_=(order), customFieldValue) ccfe <- caseCustomFieldSrv.create(ccf, `case`, cf) } yield RichCustomField(cf, ccfe)