Skip to content

Commit 186ad37

Browse files
committed
fix conditional checks for existing instance ID in data preparation processes
1 parent db34bc3 commit 186ad37

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

src/modules/workspace/dataPreparation/DataPreparationDetail.vue

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -350,12 +350,14 @@ export default defineComponent({
350350
}
351351
)
352352
353+
if (this.existingInstanceId) {
353354
this.client.publish({
354355
destination: '/app/preview',
355356
headers: {dsId: this.dataset.id},
356357
body: JSON.stringify(this.dataset.config.transformations)
357358
})
358359
}
360+
}
359361
360362
this.client.activate()
361363
}
@@ -476,12 +478,14 @@ export default defineComponent({
476478
})
477479
},
478480
async initTransformations(): Promise<void> {
479-
this.setLoading(true)
480-
await this.$http.get(import.meta.env.VITE_KNOWAGE_DATA_PREPARATION_CONTEXT + `/api/1.0/process/by-instance-id/${this.existingInstanceId}`).then((response: AxiosResponse<any>) => {
481-
if (!this.dataset.config) this.dataset.config = {}
482-
this.dataset.config.transformations = response.data.definition
483-
this.existingProcessId = response.data.id
484-
})
481+
if (this.existingInstanceId) {
482+
this.setLoading(true)
483+
await this.$http.get(import.meta.env.VITE_KNOWAGE_DATA_PREPARATION_CONTEXT + `/api/1.0/process/by-instance-id/${this.existingInstanceId}`).then((response: AxiosResponse<any>) => {
484+
if (!this.dataset.config) this.dataset.config = {}
485+
this.dataset.config.transformations = response.data.definition
486+
this.existingProcessId = response.data.id
487+
})
488+
}
485489
},
486490
async initDsMetadata() {
487491
if (this.existingProcessId) this.processId = this.existingProcessId

0 commit comments

Comments
 (0)