From 80cac150b805c3c757c37c546ef1f84010c9344f Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 7 Jun 2019 12:19:28 +0000 Subject: [PATCH] Bug 23077: Don't fill cardnumber with empty string To test: 1 - Apply unit test patch only 2 - prove the tests, they fail 3 - Attempt to import the attached sample file 4 - First patron may be imported, second will give error (or both will error) 5 - If only one error, import agian, now both have error 6 - Apply this patch 7 - Prove tests, they pass! 8 - Import the sample file 9 - It succeeds! Signed-off-by: Claire Gravely Signed-off-by: Marcel de Rooy Signed-off-by: Martin Renvoize (cherry picked from commit cc60770c4eed3ab8144acd2382e2894f7b63fb37) Signed-off-by: Fridolin Somers --- Koha/Patrons/Import.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/Koha/Patrons/Import.pm b/Koha/Patrons/Import.pm index fe63b9567e..d98e44d7c5 100644 --- a/Koha/Patrons/Import.pm +++ b/Koha/Patrons/Import.pm @@ -132,6 +132,7 @@ sub import_patrons { } } } + $borrower{cardnumber} = undef unless $borrower{cardnumber}; # Check if borrower category code exists and if it matches to a known category. Pushing error to missing_criticals otherwise. $self->check_borrower_category($borrower{categorycode}, $borrowerline, $line_number, \@missing_criticals); -- 2.39.5