From e46f3323b4acb152d666b92c0ba5f4442b9ac2c0 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 29 Jul 2014 15:11:44 -0400 Subject: [PATCH] LP#1308239 precat holds fulfillment logic repair In cases where there is no hold on a precat copy, avoid trying to find "related" holds, in part because it's unnecessary, but also because the implementation assumes a fleshed $self->volume object, which is not present during precat checkout. Signed-off-by: Bill Erickson Signed-off-by: Jason Stephenson --- Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm | 4 +++- 1 file changed, 3 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 896102d3af..f37c0fbf44 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm @@ -1792,7 +1792,9 @@ sub find_related_user_hold { my($self, $copy, $patron) = @_; my $e = $self->editor; - return undef if $self->volume->id == OILS_PRECAT_CALL_NUMBER; + # holds on precat copies are always copy-level, so this call will + # always return undef. Exit early. + return undef if $self->is_precat; return undef unless $U->ou_ancestor_setting_value( $self->circ_lib, 'circ.checkout_fills_related_hold', $e); -- 2.11.0