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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2018-10-24 14:35:16 -03:00 committed by Nick Clemens
parent 2e3eb44319
commit 2206fe7cd8

View file

@ -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;