Bug 33229: Remove unecessary txn

We don't need a transaction here.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Jonathan Druart 2023-03-22 14:34:28 +01:00 committed by Tomas Cohen Arazi
parent 7c45fc8bdf
commit 942b07a0ce
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -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(