From 1f76f313da9012c647926e688a97b04b8fe08a69 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 24 Oct 2018 14:35:16 -0300 Subject: [PATCH] Bug 21596: Handle updated_on This has been picked from the solution proposed on bug 21610. It may not be pushed soon and so we need a fix for the failing tests (t/Auth_with_shibboleth.t) Test plan: prove -r t/Auth_with_shibboleth.t t/db_dependent/Koha/Patrons* must return green --- Koha/Patron.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Koha/Patron.pm b/Koha/Patron.pm index 74157731e1..ec13bb0296 100644 --- a/Koha/Patron.pm +++ b/Koha/Patron.pm @@ -197,7 +197,14 @@ sub store { $self->debarred(undef) unless $self->debarred; $self->date_renewed(undef) unless $self->date_renewed; $self->lastseen(undef) unless $self->lastseen; - $self->updated_on(undef) unless $self->updated_on; + + if ( defined $self->updated_on and not $self->updated_on ) { + $self->updated_on(undef); + } else { + # This is bad we should use columns_info instead + # But it will avoid unecessary processing + $self->updated_on(\"current_timestamp"); + } # Set default values if not set $self->sms_provider_id(undef) unless $self->sms_provider_id; -- 2.11.0