From 05a841d60d086425f3ee8001b62a1bee363f6c5c Mon Sep 17 00:00:00 2001 From: Julien Richard Date: Mon, 30 Sep 2024 11:46:28 +0200 Subject: [PATCH] [Backend] External reference fail creation as checked attribute is not the good one (#8545) --- .../opencti-graphql/src/schema/schema-attributes.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencti-platform/opencti-graphql/src/schema/schema-attributes.ts b/opencti-platform/opencti-graphql/src/schema/schema-attributes.ts index ed53d9fa94bc..74a919220788 100644 --- a/opencti-platform/opencti-graphql/src/schema/schema-attributes.ts +++ b/opencti-platform/opencti-graphql/src/schema/schema-attributes.ts @@ -337,7 +337,7 @@ export const validateDataBeforeIndexing = (element: any) => { Object.keys(element).forEach((elementKey) => { const input = element[elementKey]; - const attributeSchemaDef = schemaAttributesDefinition.getAttributeByName(elementKey); + const attributeSchemaDef = schemaAttributesDefinition.getAttribute(element.entity_type, elementKey); if (!attributeSchemaDef) { return; // no validation to do, happens for meta fields like "_index" }