From d8b6fde9b7f59ba32f4726f55acb6f803c7816d6 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Wed, 11 Oct 2017 14:41:17 +0200 Subject: [PATCH] Bug 18625: (QA follow-up) Simplify update_lastseen No need to check the pref. Signed-off-by: Marcel de Rooy Signed-off-by: Kyle M Hall Signed-off-by: Jonathan Druart --- C4/SIP/ILS/Patron.pm | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/C4/SIP/ILS/Patron.pm b/C4/SIP/ILS/Patron.pm index 81036c9cce..23c576493f 100644 --- a/C4/SIP/ILS/Patron.pm +++ b/C4/SIP/ILS/Patron.pm @@ -452,12 +452,8 @@ sub charge_denied { sub update_lastseen { my $self = shift; - my $p; - if (C4::Context->preference('TrackLastPatronActivity') - && $p = Koha::Patrons->find({ borrowernumber => $self->{borrowernumber} })) { - $p->track_login; - } - return; + my $kohaobj = Koha::Patrons->find( $self->{borrowernumber} ); + $kohaobj->track_login if $kohaobj; # track_login checks the pref } sub _get_address { -- 2.39.5