When importing a patron file where new records
do not have a card number *and* autoMemberNum is
off, make sure that bororwers.cardnumber is set to NULL
for those new patrons rather than '' - otherwise, only
one patron with an empty barcode can be created, as there is
a uniqueness constraint on borrowers.cardnumber
---
tools/import_borrowers.pl | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/import_borrowers.pl b/tools/import_borrowers.pl
index 9ac994b..9738f19 100755
--- a/tools/import_borrowers.pl
+++ b/tools/import_borrowers.pl
@@ -252,7 +252,7 @@ if ( $uploadborrowers && length($uploadborrowers) > 0 ) {
# FIXME: fixup_cardnumber says to lock table, but the web
interface doesn't so this doesn't either.
# At least this is closer to AddMember than in
members/memberentry.pl
if (!$borrower{'cardnumber'}) {
- $borrower{'cardnumber'} = fixup_cardnumber('');
+ $borrower{'cardnumber'} = fixup_cardnumber(undef);
}
if ($borrowernumber = AddMember(%borrower)) {
if ($extended) {
--
1.5.6.5
_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches