From 47ab015a78b94d7e9e530747729825302fbaa016 Mon Sep 17 00:00:00 2001 From: Thomas Berezansky Date: Sat, 2 Jul 2011 18:50:27 -0400 Subject: [PATCH] Fix checkout on alternate patron barcode Specifically, when a non-primary patron barcode is used. Such as via SIP2. NOTE: This does not change the behavior of inactive cards, nor will stock Evergreen usage produce a situation where this fix comes into play. --miker Signed-off-by: Thomas Berezansky Signed-off-by: Mike Rylander --- Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm index 0b36f40627..2d4270497b 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm @@ -764,9 +764,12 @@ sub mk_env { my $card = $e->search_actor_card({barcode => $self->patron_barcode})->[0] or return $self->bail_on_events(OpenILS::Event->new('ACTOR_USER_NOT_FOUND')); - $patron = $e->search_actor_user([{card => $card->id}, $flesh])->[0] + $patron = $e->retrieve_actor_user($card->usr) or return $self->bail_on_events(OpenILS::Event->new('ACTOR_USER_NOT_FOUND')); + # Use the card we looked up, not the patron's primary, for card active checks + $patron->card($card); + } else { if( my $copy = $self->copy ) { -- 2.11.0