From 8a9c82c3ec42fb5c2937fa523170b3710288d7fd Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Thu, 21 Feb 2019 14:30:22 +0000 Subject: [PATCH] Bug 22386: Define patron variable when matchign on extended attributes For all other methods we define a patron object and check the userid, we just need to define the $patron here To test: 0 - Apply unit test patch alone 1 - prove t/db_dependent/Koha/Patrons/Import.t 2 - It dies 3 - Apply this patch 4 - repeat tests 5 - It passes! Signed-off-by: Devlyn Courtier Signed-off-by: Jonathan Druart Signed-off-by: Nick Clemens --- Koha/Patrons/Import.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/Koha/Patrons/Import.pm b/Koha/Patrons/Import.pm index 8311126ef3..fe63b9567e 100644 --- a/Koha/Patrons/Import.pm +++ b/Koha/Patrons/Import.pm @@ -176,6 +176,7 @@ sub import_patrons { if ( $attr->{code} eq $matchpoint and $attr->{value} ne '' ) { my @borrowernumbers = $matchpoint_attr_type->get_patrons( $attr->{value} ); $borrowernumber = $borrowernumbers[0] if scalar(@borrowernumbers) == 1; + $patron = Koha::Patrons->find( $borrowernumber ); last; } } -- 2.39.5