From b9af2e9731ef17af3d35090e5bae3af65a8d08c4 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 9 Aug 2016 10:17:18 +0100 Subject: [PATCH] Bug 16907: Make sure the log will be written only if the patron has been deleted Signed-off-by: Tomas Cohen Arazi Signed-off-by: Martin Renvoize Signed-off-by: Kyle M Hall --- Koha/Patron.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Koha/Patron.pm b/Koha/Patron.pm index 6692348d87..84c49c7b9f 100644 --- a/Koha/Patron.pm +++ b/Koha/Patron.pm @@ -83,8 +83,9 @@ sub delete { # FIXME Could be $patron->get_lists $_->delete for Koha::Virtualshelves->search( { owner => $self->borrowernumber } ); - logaction( "MEMBERS", "DELETE", $self->borrowernumber, "" ) if C4::Context->preference("BorrowersLog"); $deleted = $self->SUPER::delete; + + logaction( "MEMBERS", "DELETE", $self->borrowernumber, "" ) if C4::Context->preference("BorrowersLog"); } ); return $deleted; -- 2.39.5