From 8f8eb35c2f6d56dfd332cbe6212db75aae8b8f50 Mon Sep 17 00:00:00 2001 From: Colin Campbell Date: Thu, 10 Aug 2017 13:56:24 +0100 Subject: [PATCH] Bug 12598: Allow matched patron to be updated When a test was introduced to not add duplicate userids it overlooked that if you were matching on userid you do not want the update to be rejected. Add a test to overcome this logical flaw if updating by matching userid Signed-off-by: Jonathan Druart --- 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 db6beb0481..c785604766 100644 --- a/Koha/Patrons/Import.pm +++ b/Koha/Patrons/Import.pm @@ -199,7 +199,7 @@ sub import_patrons { } # Check if the userid provided does not exist yet - if ( exists $borrower{userid} + if ( $matchpoint ne 'userid' and exists $borrower{userid} and $borrower{userid} and not Check_Userid( $borrower{userid}, $borrower{borrowernumber} ) ) { push @errors, { duplicate_userid => 1, userid => $borrower{userid} }; -- 2.39.5