Bug 14642: Make sure the log will be written only if the hold has been deleted

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2016-08-09 10:14:44 +01:00 committed by Kyle M Hall
parent a61e0a3324
commit b4a08cad60
1 changed files with 3 additions and 1 deletions

View File

@ -99,10 +99,12 @@ $hold->delete();
sub delete {
my ( $self ) = @_;
my $deleted = $self->SUPER::delete($self);
logaction( 'HOLDS', 'DELETE', $self->reserve_id, Dumper($self->unblessed) )
if C4::Context->preference('HoldsLog');
return $self->SUPER::delete($self);
return $deleted;
}
=head3 waiting_expires_on