From: Mike Rylander <mrylander@gmail.com>
Date: Thu, 14 Jul 2011 15:42:26 +0000 (-0400)
Subject: Correct CDBI thinko -- search_where is smart about wantarray, search is not
X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e04f9382c578010b355fe9ad214cf06b197ef9d5;p=evergreen%2Fmasslnc.git

Correct CDBI thinko -- search_where is smart about wantarray, search is not

Signed-off-by: Mike Rylander <mrylander@gmail.com>
---

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm
index ca1e0dfde5..23717a78d8 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm
@@ -1271,7 +1271,7 @@ sub new_hold_copy_targeter {
 						isTrue($_->holdable) &&
 						!isTrue($_->deleted) &&
 						(isTrue($hold->mint_condition) ? isTrue($_->mint_condition) : 1) &&
-						($hold->hold_type ne 'P' ? @{ $_->part_maps } == 0 : 1)
+						($hold->hold_type ne 'P' ? $_->part_maps->count == 0 : 1)
 					} @$all_copies;
 
 			# let 'em know we're still working