From 8d117c6eba117a8a3fc8e4ac5ad6814cf0f6a6f5 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 5 Feb 2021 06:15:06 -0500 Subject: [PATCH] Bug 27586: Rollback should be before return statement Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart (cherry picked from commit 48e56b320a0dc2d096b19bc0bab62d3bad92d25c) Signed-off-by: Fridolin Somers --- Koha/Patrons/Import.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Koha/Patrons/Import.pm b/Koha/Patrons/Import.pm index 6f5646a416..03e3b0ad85 100644 --- a/Koha/Patrons/Import.pm +++ b/Koha/Patrons/Import.pm @@ -420,6 +420,8 @@ sub import_patrons { } } + $schema->storage->txn_rollback if $dry_run; + return { feedback => \@feedback, errors => \@errors, @@ -429,8 +431,6 @@ sub import_patrons { invalid => $invalid, imported_borrowers => \@imported_borrowers, }; - - $schema->storage->txn_rollback if $dry_run; } =head2 prepare_columns -- 2.39.5