SIP: Fix holds with zero volumes
authorJeff Godin <jgodin@tadl.org>
Sun, 22 May 2016 18:52:08 +0000 (14:52 -0400)
committerJeff Godin <jgodin@tadl.org>
Sun, 22 May 2016 18:52:08 +0000 (14:52 -0400)
Signed-off-by: Jeff Godin <jgodin@tadl.org>
Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm

index 99fcc43..39ba98e 100644 (file)
@@ -574,6 +574,8 @@ sub find_copy_for_hold {
         {idlist => 1}
     );
 
+    return undef unless @$vol_ids;
+
     return $e->search_asset_copy([
         {call_number => $vol_ids, deleted => 'f'}, 
         {limit => 1}