From 9fc6a3304f4077a208e6d91c7fff6015f0cab932 Mon Sep 17 00:00:00 2001 From: Marina Fedyantceva Date: Wed, 25 Dec 2024 18:27:28 +0300 Subject: [PATCH] [SPT-767] fixed error in open service without training --- src/Redux/actionCreators/ServiceDetailsActions.js | 2 +- .../ServiceDetails/DataPreset/DatasetInfo/index.js | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/Redux/actionCreators/ServiceDetailsActions.js b/src/Redux/actionCreators/ServiceDetailsActions.js index 747fe01f..74895045 100644 --- a/src/Redux/actionCreators/ServiceDetailsActions.js +++ b/src/Redux/actionCreators/ServiceDetailsActions.js @@ -96,7 +96,7 @@ export const getIsTrainingAvailable = (detailsTraining, isLoggedIn) => { return false; } - if (!Object.prototype.hasOwnProperty.call(detailsTraining, "trainingMethods")) { + if (!Object.prototype.hasOwnProperty.call(detailsTraining, "trainingMethods") || !detailsTraining?.trainingMethods) { return false; } diff --git a/src/components/ServiceDetails/DataPreset/DatasetInfo/index.js b/src/components/ServiceDetails/DataPreset/DatasetInfo/index.js index a83cefc2..88aaeedc 100644 --- a/src/components/ServiceDetails/DataPreset/DatasetInfo/index.js +++ b/src/components/ServiceDetails/DataPreset/DatasetInfo/index.js @@ -33,13 +33,11 @@ const DatasetInfo = ({ classes, datasetParameters }) => { )} - {!datasetParameter?.value ? - ( - - ) : - ( -

{datasetParameter.value}

- )} + {!datasetParameter?.value ? ( + + ) : ( +

{datasetParameter.value}

+ )} ))}