From 942b07a0cecc9f63d956beafe55027b02d7b9aa3 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 Signed-off-by: Tomas Cohen Arazi --- Koha/Patron.pm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Koha/Patron.pm b/Koha/Patron.pm index e6e4fca942..f0e1734217 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.39.5