From 11f3d654d7c2568ecc6c253f01957c31213d4999 Mon Sep 17 00:00:00 2001
From: "stu126940@mail.uni-kiel.de" <stu126940@mail.uni-kiel.de>
Date: Tue, 5 Oct 2021 21:41:28 +0200
Subject: [PATCH] fix accessing incorrect name field while deleting an running
 execution

---
 .../theodolite/execution/operator/ExecutionEventHandler.kt      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/theodolite/src/main/kotlin/theodolite/execution/operator/ExecutionEventHandler.kt b/theodolite/src/main/kotlin/theodolite/execution/operator/ExecutionEventHandler.kt
index 62c1ddd4e..1209195ee 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()
         }
-- 
GitLab