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:
Jonathan Druart 2017-07-25 10:10:54 -03:00
parent 70c45c3781
commit c9c0697ca5

View file

@ -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,
{