diff --git a/openbas-front/src/actions/Schema.js b/openbas-front/src/actions/Schema.js index 513403c5d5..6dd9b1a9ef 100644 --- a/openbas-front/src/actions/Schema.js +++ b/openbas-front/src/actions/Schema.js @@ -286,7 +286,9 @@ const getInjectWithParsedInjectorContractContent = (i) => { ...i, inject_injector_contract: { ...i.inject_injector_contract, - injector_contract_content_parsed: JSON.parse(i.inject_injector_contract.injector_contract_content), + injector_contract_content_parsed: i.inject_injector_contract?.injector_contract_content + ? JSON.parse(i.inject_injector_contract.injector_contract_content) + : null, }, }); }; diff --git a/openbas-front/src/admin/components/atomic_testings/InjectList.tsx b/openbas-front/src/admin/components/atomic_testings/InjectList.tsx index 5393988530..90e7262cca 100644 --- a/openbas-front/src/admin/components/atomic_testings/InjectList.tsx +++ b/openbas-front/src/admin/components/atomic_testings/InjectList.tsx @@ -100,7 +100,7 @@ const InjectList: FunctionComponent = ({ value: (injectDto: InjectResultDTO) => { if (injectDto.inject_injector_contract) { return ( - + ); } return ; diff --git a/openbas-front/src/admin/components/atomic_testings/atomic_testing/AtomicTesting.tsx b/openbas-front/src/admin/components/atomic_testings/atomic_testing/AtomicTesting.tsx index 79a8a1b245..0997d7b0a6 100644 --- a/openbas-front/src/admin/components/atomic_testings/atomic_testing/AtomicTesting.tsx +++ b/openbas-front/src/admin/components/atomic_testings/atomic_testing/AtomicTesting.tsx @@ -107,7 +107,7 @@ const AtomicTesting = () => { : injectResultDto.inject_type } /> - +
{ textOverflow: 'ellipsis', }} > - {tPick(injectResultDto.inject_injector_contract.injector_contract_labels)} + {tPick(injectResultDto.inject_injector_contract?.injector_contract_labels)}
@@ -151,7 +151,7 @@ const AtomicTesting = () => { {t('Platforms')}
- {injectResultDto.inject_injector_contract.injector_contract_platforms?.map((platform: string) => ( + {injectResultDto.inject_injector_contract?.injector_contract_platforms?.map((platform: string) => (
{platform} diff --git a/openbas-front/src/admin/components/atomic_testings/atomic_testing/AtomicTestingDetail.tsx b/openbas-front/src/admin/components/atomic_testings/atomic_testing/AtomicTestingDetail.tsx index 5eaac36b25..ffd7a9fc3a 100644 --- a/openbas-front/src/admin/components/atomic_testings/atomic_testing/AtomicTestingDetail.tsx +++ b/openbas-front/src/admin/components/atomic_testings/atomic_testing/AtomicTestingDetail.tsx @@ -64,7 +64,7 @@ const AtomicTestingDetail: FunctionComponent = () => { {t('Type')} - {tPick(injectResultDto.inject_injector_contract.injector_contract_labels)} + {tPick(injectResultDto.inject_injector_contract?.injector_contract_labels)}