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>
}
# 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} };