Skip to content

Commit cb71e1f

Browse files
committed
fix dataset status when get is called on type none
1 parent c3ad0d1 commit cb71e1f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dataset/src/main/kotlin/com/cosmotech/dataset/service/DatasetServiceImpl.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,8 @@ class DatasetServiceImpl(
310310
// This call verify by itself that we have the read authorization in the dataset
311311
val dataset = findDatasetById(organizationId, datasetId)
312312
return when (dataset.sourceType) {
313-
null,
314-
DatasetSourceType.None -> Dataset.Status.DRAFT.value
313+
null -> Dataset.Status.DRAFT.value
314+
DatasetSourceType.None -> dataset.status!!.value
315315
DatasetSourceType.File -> {
316316
if (dataset.status == Dataset.Status.DRAFT) {
317317
return Dataset.Status.DRAFT.value

0 commit comments

Comments
 (0)