From 4a25257b5e4a8ff8013f11ce8d2cd7102f836fc8 Mon Sep 17 00:00:00 2001 From: Gael Leblan Date: Thu, 2 Jan 2025 10:26:44 +0100 Subject: [PATCH] [backend] Fix on 500 errors when importing a scenario (#2144) --- .../src/main/java/io/openbas/importer/V1_DataImporter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openbas-api/src/main/java/io/openbas/importer/V1_DataImporter.java b/openbas-api/src/main/java/io/openbas/importer/V1_DataImporter.java index c677a8b6e5..8e63cf9d8a 100644 --- a/openbas-api/src/main/java/io/openbas/importer/V1_DataImporter.java +++ b/openbas-api/src/main/java/io/openbas/importer/V1_DataImporter.java @@ -805,7 +805,7 @@ private void importInjects( ofNullable(injectNode.get("inject_enabled")).map(JsonNode::booleanValue).orElse(true); String injectorContractIdFromNode = null; JsonNode injectContractNode = injectNode.get("inject_injector_contract"); - if (injectContractNode != null) { + if (injectContractNode != null && !injectContractNode.isNull()) { injectorContractIdFromNode = injectContractNode.get("injector_contract_id").textValue(); }