Skip to content

Commit

Permalink
fix: remove error for not having a program in TE
Browse files Browse the repository at this point in the history
  • Loading branch information
martinkrulltott committed Nov 3, 2023
1 parent 48f58b3 commit fdc915c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
7 changes: 0 additions & 7 deletions src/modules/error.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
7 changes: 2 additions & 5 deletions src/modules/layoutValidation.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
noEntityTypeError,
noOrgUnitError,
noProgramError,
noProgramForTEError,
} from './error.js'
import { OUTPUT_TYPE_TRACKED_ENTITY } from './visualization.js'

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit fdc915c

Please sign in to comment.