From d350fd67233e8550e7fb183bd9c0b3d537875ad7 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 22 Mar 2023 14:34:28 +0100 Subject: [PATCH] Bug 33229: Remove unecessary txn We don't need a transaction here. Signed-off-by: Jonathan Druart --- Koha/Patron.pm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Koha/Patron.pm b/Koha/Patron.pm index 3d54aae0098..e9bf916db78 100644 --- a/Koha/Patron.pm +++ b/Koha/Patron.pm @@ -302,10 +302,7 @@ sub store { # their checkouts if( $self->privacy() == 2 && $self_from_storage->privacy() != 2 ){ try{ - my $schema = Koha::Database->new()->schema(); - $schema->txn_do( - sub { $self->old_checkouts->anonymize; } - ); + $self->old_checkouts->anonymize; } catch { Koha::Exceptions::Patron::FailedAnonymizing->throw( -- 2.25.1