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 <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
b361ff2d7d
commit
8f8eb35c2f
|
|
@ -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} };
|
||||
|
|
|
|||
Loading…
Reference in New Issue