From 6662034d2021e5eb07c92d9bc2c30d16f353f58c Mon Sep 17 00:00:00 2001
From: miker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date: Fri, 24 Sep 2010 17:45:49 +0000
Subject: [PATCH] excise the no-potentials check, should only effect frozen
 holds

git-svn-id: svn://svn.open-ils.org/ILS/trunk@17956 dcc99617-32d9-48b4-a31d-7c20da2025e4
---
 .../src/perlmods/OpenILS/Application/Circ/Holds.pm | 34 +++++++---------------
 1 file changed, 11 insertions(+), 23 deletions(-)

diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
index 49aac1a91c..01819699d1 100644
--- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
+++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
@@ -1033,11 +1033,7 @@ sub retrieve_hold_queue_status_impl {
         # fetch cut_in_line and request_time since they're in the order_by
         # and we're asking for distinct values
         select => {ahr => ['id', 'cut_in_line', 'request_time']},
-        from   => {
-            ahr => {
-                ahcm => {type => 'left'} # there may be no copy maps 
-            }
-        },
+        from   => { ahr => 'ahcm' },
         order_by => [
             {
                 "class" => "ahr",
@@ -1050,26 +1046,18 @@ sub retrieve_hold_queue_status_impl {
         ],
         distinct => 1,
         where    => {
-            '-or' => [
-                {
-                    '+ahcm' => {
-                        target_copy => {
-                            in => {
-                                select => {ahcm => ['target_copy']},
-                                from   => 'ahcm',
-                                where  => {hold => $hold->id}
-                            } 
+            {
+                '+ahcm' => {
+                    target_copy => {
+                        in => {
+                            select => {ahcm => ['target_copy']},
+                            from   => 'ahcm',
+                            where  => {hold => $hold->id}
                         } 
-                    }
-                },
-                {
-                    '+ahr' => {
-                        hold_type => $hold->hold_type,
-                        target    => $hold->target
-                    }
+                    } 
                 }
-            ]
-        }, 
+            }
+        } 
     });
 
     my $qpos = 1;
-- 
2.11.0