From 63836649487cff867dcee4737f902a7f34a4c241 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 17 May 2011 00:40:02 -0400 Subject: [PATCH] stop hold permit check from crashing if age protection in effect Signed-off-by: Galen Charlton --- Open-ILS/src/sql/Pg/110.hold_matrix.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Open-ILS/src/sql/Pg/110.hold_matrix.sql b/Open-ILS/src/sql/Pg/110.hold_matrix.sql index 41054727e0..602bcdb761 100644 --- a/Open-ILS/src/sql/Pg/110.hold_matrix.sql +++ b/Open-ILS/src/sql/Pg/110.hold_matrix.sql @@ -174,6 +174,7 @@ DECLARE transit_range_ou_type actor.org_unit_type%ROWTYPE; transit_source actor.org_unit%ROWTYPE; item_object asset.copy%ROWTYPE; + item_cn_object asset.call_number%ROWTYPE; result action.matrix_test_result; hold_test config.hold_matrix_matchpoint%ROWTYPE; hold_count INT; @@ -308,6 +309,7 @@ BEGIN IF item_object.create_date + age_protect_object.age > NOW() THEN IF hold_test.distance_is_from_owner THEN + SELECT INTO item_cn_object * FROM asset.call_number WHERE id = item_object.call_number; SELECT INTO hold_transit_prox prox FROM actor.org_unit_proximity WHERE from_org = item_cn_object.owning_lib AND to_org = pickup_ou; ELSE SELECT INTO hold_transit_prox prox FROM actor.org_unit_proximity WHERE from_org = item_object.circ_lib AND to_org = pickup_ou; -- 2.11.0