diff --git a/theodolite/src/main/kotlin/theodolite/execution/operator/ExecutionEventHandler.kt b/theodolite/src/main/kotlin/theodolite/execution/operator/ExecutionEventHandler.kt index 62c1ddd4eecb41aecde7000eb048455c95cab949..1209195ee09cebe382f010f38e955dea1c860cd1 100644 --- a/theodolite/src/main/kotlin/theodolite/execution/operator/ExecutionEventHandler.kt +++ b/theodolite/src/main/kotlin/theodolite/execution/operator/ExecutionEventHandler.kt @@ -80,7 +80,7 @@ class ExecutionHandler( override fun onDelete(execution: ExecutionCRD, b: Boolean) { logger.info { "Delete execution ${execution.metadata.name}" } if (execution.status.executionState == States.RUNNING.value - && this.controller.isExecutionRunning(execution.spec.name) + && this.controller.isExecutionRunning(execution.metadata.name) ) { this.controller.stop() }