Bug 21596: Handle empty string for lost when storing a patron
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 17 Oct 2018 23:02:12 +0000 (20:02 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Thu, 18 Oct 2018 14:17:40 +0000 (14:17 +0000)
lost - should default to 0 at DB level, not null
But let fix it as it for now

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Koha/Patron.pm

index fb3f868..7415773 100644 (file)
@@ -210,6 +210,7 @@ sub store {
             $self->gonenoaddress(0)  unless $self->gonenoaddress;
             $self->login_attempts(0) unless $self->login_attempts;
             $self->privacy_guarantor_checkouts(0) unless $self->privacy_guarantor_checkouts;
+            $self->lost(0)           unless $self->lost;
 
             unless ( $self->in_storage ) {    #AddMember