From f1cf4a9d3b4b2580e7991463a14da08a8813d478 Mon Sep 17 00:00:00 2001 From: Arseni Tsikhamirau Date: Thu, 11 Jan 2024 17:24:54 +0100 Subject: [PATCH] IJMP-1332-bugfix/IJMP-1332-Cut/Paste-does-not-work-properly-when-moving-sequential-dataset --- .../dataops/operations/mover/SequentialToPdsMover.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/eu/ibagroup/formainframe/dataops/operations/mover/SequentialToPdsMover.kt b/src/main/kotlin/eu/ibagroup/formainframe/dataops/operations/mover/SequentialToPdsMover.kt index 0e53939c..cb15b2a5 100644 --- a/src/main/kotlin/eu/ibagroup/formainframe/dataops/operations/mover/SequentialToPdsMover.kt +++ b/src/main/kotlin/eu/ibagroup/formainframe/dataops/operations/mover/SequentialToPdsMover.kt @@ -83,7 +83,8 @@ class SequentialToPdsMover(val dataOpsManager: DataOpsManager) : AbstractFileMov memberName = memberName ).cancelByIndicator(progressIndicator).execute() - if (!response.isSuccessful && response.errorBody()?.string()?.contains("data set is empty") == true) { + // Proceed with deletion of source dataset in case of successful response or dataset was empty, throw exception otherwise + if (response.isSuccessful || response.errorBody()?.string()?.contains("data set is empty") == true) { if (operation.isMove) { val deleteResponse = api( url = connectionConfig.url,