From 77d5f88e9ca5419b063b18ee424b4531cf1fe034 Mon Sep 17 00:00:00 2001 From: Michael Peters Date: Thu, 29 Sep 2011 09:17:18 -0400 Subject: [PATCH] [LP822918] Do not count items out if renewal I wrapped the code in action.item_user_circ_test that counts items out in a IF NOT renewal THEN block, not sure if that is the best way to deal with this but it seems to be working. From: Doug Kyle Signed-off-by: Michael Peters --- Open-ILS/src/sql/Pg/2.0-2.1-upgrade-db.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Open-ILS/src/sql/Pg/2.0-2.1-upgrade-db.sql b/Open-ILS/src/sql/Pg/2.0-2.1-upgrade-db.sql index cbb6f71c2b..e1ef2a5dc7 100644 --- a/Open-ILS/src/sql/Pg/2.0-2.1-upgrade-db.sql +++ b/Open-ILS/src/sql/Pg/2.0-2.1-upgrade-db.sql @@ -1141,6 +1141,7 @@ BEGIN END IF; END IF; + IF NOT renwal THEN -- Fail if the user has too many items with specific circ_modifiers checked out FOR out_by_circ_mod IN SELECT * FROM config.circ_matrix_circ_mod_test WHERE matchpoint = circ_matchpoint.id LOOP SELECT INTO items_out COUNT(*) @@ -1158,6 +1159,7 @@ BEGIN RETURN NEXT result; END IF; END LOOP; + END IF; -- If we passed everything, return the successful matchpoint id IF NOT done THEN -- 2.11.0