Bug 23077: Fix import of cardnumber 0
[koha-equinox.git] / Koha / Patrons / Import.pm
index d98e44d..b18db0d 100644 (file)
@@ -132,7 +132,8 @@ sub import_patrons {
                 }
             }
         }
-        $borrower{cardnumber} = undef unless $borrower{cardnumber};
+
+        $borrower{cardnumber} = undef if $borrower{cardnumber} eq "";
 
         # 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);