From b4a08cad608b8b8aebfebd5a6e058554a7b4bf59 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 9 Aug 2016 10:14:44 +0100 Subject: [PATCH] Bug 14642: Make sure the log will be written only if the hold has been deleted Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- Koha/Hold.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Koha/Hold.pm b/Koha/Hold.pm index 3cc8440ce7..ba75a523b7 100644 --- a/Koha/Hold.pm +++ b/Koha/Hold.pm @@ -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 -- 2.39.5