From 70f512853f9c4f6f4e405614caacba79571913ed Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Thu, 18 Oct 2018 11:16:03 +0000 Subject: [PATCH] Bug 21596: Don't set a default of "" for NULL columns during patron import To test: 1 - dev_install must be set to 1 2 - prove -v t/db_dependent/Koha/Patrons/Import.t 3 - It fails 4 - Apply patch 5 - It passes --- Koha/Patrons/Import.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Patrons/Import.pm b/Koha/Patrons/Import.pm index 1adb32d..bb82dc1 100644 --- a/Koha/Patrons/Import.pm +++ b/Koha/Patrons/Import.pm @@ -128,6 +128,7 @@ sub import_patrons { push @missing_criticals, { key => $key, line => $., lineraw => $borrowerline }; } else { + next if grep { $key eq $_ } ('date_renewed','flags','gonenoaddress','lastseen','login_attempts','lost','updated_on','privacy_guarantor_checkouts'); $borrower{$key} = ''; } } @@ -419,7 +420,6 @@ Returns an array of borrowers' table columns. sub set_column_keys { my ($self, $extended) = @_; - my @columnkeys = map { $_ ne 'borrowernumber' ? $_ : () } Koha::Patrons->columns(); push( @columnkeys, 'patron_attributes' ) if $extended; -- 2.1.4