Bug 12598: Fix conflict with 17829 - GetMember
Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
70c45c3781
commit
c9c0697ca5
1 changed files with 8 additions and 4 deletions
|
@ -163,10 +163,7 @@ sub import_patrons {
|
|||
my $borrowernumber;
|
||||
my $member;
|
||||
if ( defined($matchpoint) && ( $matchpoint eq 'cardnumber' ) && ( $borrower{'cardnumber'} ) ) {
|
||||
$member = GetMember( 'cardnumber' => $borrower{'cardnumber'} );
|
||||
if ($member) {
|
||||
$borrowernumber = $member->{'borrowernumber'};
|
||||
}
|
||||
$member = Koha::Patrons->find( { cardnumber => $borrower{'cardnumber'} } );
|
||||
}
|
||||
elsif ($extended) {
|
||||
if ( defined($matchpoint_attr_type) ) {
|
||||
|
@ -180,6 +177,13 @@ sub import_patrons {
|
|||
}
|
||||
}
|
||||
|
||||
if ($member) {
|
||||
$member = $member->unblessed;
|
||||
$borrowernumber = $member->{'borrowernumber'};
|
||||
} else {
|
||||
$member = {};
|
||||
}
|
||||
|
||||
if ( C4::Members::checkcardnumber( $borrower{cardnumber}, $borrowernumber ) ) {
|
||||
push @errors,
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue