diff --git a/Koha/Patrons/Import.pm b/Koha/Patrons/Import.pm index 3437f38c35..f1bb06e3a9 100644 --- a/Koha/Patrons/Import.pm +++ b/Koha/Patrons/Import.pm @@ -217,6 +217,20 @@ sub import_patrons { next LINE; } + my $relationship = $borrower{relationship}; + my $guarantor_id = $borrower{guarantor_id}; + delete $borrower{relationship}; + delete $borrower{guarantor_id}; + + # Remove warning for int datatype that cannot be null + # Argument "" isn't numeric in numeric eq (==) at /usr/share/perl5/DBIx/Class/Row.pm line 1018 + for my $field ( + qw( privacy privacy_guarantor_fines privacy_guarantor_checkouts anonymized login_attempts )) + { + delete $borrower{$field} + if exists $borrower{$field} and $borrower{$field} eq ""; + } + if ($borrowernumber) { # borrower exists