From 7c4f6ad39243b7c151af6bdaeb5cb8aafe774982 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 25 Jul 2017 10:10:54 -0300 Subject: [PATCH] Bug 12598: Fix conflict with 17829 - GetMember --- Koha/Patrons/Import.pm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Koha/Patrons/Import.pm b/Koha/Patrons/Import.pm index 10173bb755..965db661c9 100644 --- a/Koha/Patrons/Import.pm +++ b/Koha/Patrons/Import.pm @@ -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, { -- 2.11.0