From 97c7b4dd8664a73486aa6c813ed6804c88f640cb Mon Sep 17 00:00:00 2001 From: Thomas Berezansky Date: Wed, 1 Feb 2012 14:16:53 -0500 Subject: [PATCH] Fix HoldIsAvailable validator Depending on the environment some things may be ids or references. Comparisons should try and use the IDs only, so pull the IDs out. Signed-off-by: Thomas Berezansky Signed-off-by: Bill Erickson --- Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Validator.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Validator.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Validator.pm index 57563e02f5..55c574288d 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Validator.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Validator.pm @@ -77,7 +77,8 @@ sub HoldIsAvailable { !$hold->cancel_time and !$hold->fulfillment_time and $hold->current_shelf_lib and - $hold->current_shelf_lib eq $hold->pickup_lib and + (ref $hold->current_shelf_lib ? $hold->current_shelf_lib->id : $hold->current_shelf_lib) + eq (ref $hold->pickup_lib ? $hold->pickup_lib->id : $hold->pickup_lib) and $hold->capture_time and # redundant $hold->current_copy and # redundant $hold->shelf_time and # redundant -- 2.11.0