From 899b1ca30d70c2db53d2e0582be1b28aae4738f0 Mon Sep 17 00:00:00 2001 From: Gael Leblan Date: Wed, 23 Oct 2024 15:48:24 +0200 Subject: [PATCH] [frontend] Small fix on adding a new parent using the tab --- .../admin/components/common/injects/InjectChainsForm.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/openbas-front/src/admin/components/common/injects/InjectChainsForm.tsx b/openbas-front/src/admin/components/common/injects/InjectChainsForm.tsx index accc9804fa..b1050e3c05 100644 --- a/openbas-front/src/admin/components/common/injects/InjectChainsForm.tsx +++ b/openbas-front/src/admin/components/common/injects/InjectChainsForm.tsx @@ -196,7 +196,6 @@ const InjectForm: React.FC = ({ values, form, injects }) => { } return element; }); - setParents(newParents); const baseInjectDependency: InjectDependency = { @@ -215,15 +214,12 @@ const InjectForm: React.FC = ({ values, form, injects }) => { mode: 'and', }, }; + setParentConditions(getConditionContentParent([baseInjectDependency])); form.mutators.setValue( 'inject_depends_on', [baseInjectDependency], ); - - if (newInject!.inject_depends_on !== null) { - setParentConditions(getConditionContentParent(injectDependencyFromDependency(newParents))); - } }; /**