From: Thomas Berezansky Date: Wed, 1 Feb 2012 19:16:53 +0000 (-0500) Subject: Fix HoldIsAvailable validator X-Git-Tag: sprint4-merge-nov22~4607 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=97c7b4dd8664a73486aa6c813ed6804c88f640cb;p=working%2FEvergreen.git 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 --- 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