From fdc915c6d8c9c875de72f0a32babd4275585e9c2 Mon Sep 17 00:00:00 2001 From: martinkrulltott Date: Fri, 3 Nov 2023 14:59:50 +0100 Subject: [PATCH] fix: remove error for not having a program in TE --- src/modules/error.js | 7 ------- src/modules/layoutValidation.js | 7 ++----- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/modules/error.js b/src/modules/error.js index 57649ff68..eb91c69e6 100644 --- a/src/modules/error.js +++ b/src/modules/error.js @@ -53,13 +53,6 @@ export const noProgramError = () => i18n.t('Choose a program from the Input sidebar.') ) -export const noProgramForTEError = () => - visualizationError( - EmptyBox, - i18n.t('No program selected'), - i18n.t('Choose a program from the Program dimensions sidebar.') - ) - export const noColumnsError = () => visualizationError( EmptyBox, diff --git a/src/modules/layoutValidation.js b/src/modules/layoutValidation.js index 0bfc3e90c..0906142f3 100644 --- a/src/modules/layoutValidation.js +++ b/src/modules/layoutValidation.js @@ -10,7 +10,6 @@ import { noEntityTypeError, noOrgUnitError, noProgramError, - noProgramForTEError, } from './error.js' import { OUTPUT_TYPE_TRACKED_ENTITY } from './visualization.js' @@ -44,11 +43,9 @@ export const validateLineListLayout = (layout, { dryRun } = {}) => { if (dryRun) { return false } - if (layout.outputType === OUTPUT_TYPE_TRACKED_ENTITY) { - throw noProgramForTEError() + if (layout.outputType !== OUTPUT_TYPE_TRACKED_ENTITY) { + throw noProgramError() } - - throw noProgramError() } // columns