From cf20c0ac850f5f88f690061b6f12efaf59b1cf40 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 (cherry picked from commit 942b07a0cecc9f63d956beafe55027b02d7b9aa3) Signed-off-by: Matt Blenkinsop --- Koha/Patron.pm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Koha/Patron.pm b/Koha/Patron.pm index 8efc749ef0..75270c71db 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