From f8e7a175575649ab1303c65ae259501dda90f3ff Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 17 Oct 2018 19:53:47 -0300 Subject: [PATCH] Bug 21596: Handle empty string for flags when storing a patron Incorrect integer value: '' for column 'flags' Signed-off-by: Nick Clemens Signed-off-by: Martin Renvoize Signed-off-by: Nick Clemens --- Koha/Patron.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Koha/Patron.pm b/Koha/Patron.pm index 4c9f955a13..523f745a86 100644 --- a/Koha/Patron.pm +++ b/Koha/Patron.pm @@ -201,6 +201,9 @@ sub store { $self->sms_provider_id(undef) unless $self->sms_provider_id; $self->guarantorid(undef) unless $self->guarantorid; + # If flags == 0 or flags == '' => no permission + $self->flags(undef) unless $self->flags; + unless ( $self->in_storage ) { #AddMember # Generate a valid userid/login if needed -- 2.39.5