Skip to content

Commit 59e46f7

Browse files
committed
[PROD-14190] fix "Dataset cannot be found in Datasets" error 500 when a scenario parameter %DATASET_ID% is empty
1 parent 7ac336b commit 59e46f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scenariorun/src/main/kotlin/com/cosmotech/scenariorun/ContainerFactory.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1125,7 +1125,7 @@ class ContainerFactory(
11251125
}
11261126
?: throw IllegalStateException(
11271127
"Parameter ${parameterValue.parameterId} not found in Solution ${solution.id}")
1128-
if (parameter.varType == PARAMETERS_DATASET_ID) {
1128+
if (parameter.varType == PARAMETERS_DATASET_ID && parameterValue.value.isNotBlank()) {
11291129
val datasetIdList = getDatasetIdListFromValue(parameterValue.value)
11301130
datasetIdList.forEachIndexed { index, datasetId ->
11311131
val dataset =

0 commit comments

Comments
 (0)