From 69108be22276f4677846c98569ecb33d4acc6f3c 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 --- Koha/Patron.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Koha/Patron.pm b/Koha/Patron.pm index ba9f3b7..cdd1582 100644 --- a/Koha/Patron.pm +++ b/Koha/Patron.pm @@ -82,8 +82,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.8.1