LP#1312699 Circ history clear-all repair
authorBill Erickson <berickxx@gmail.com>
Wed, 2 Mar 2016 15:30:24 +0000 (10:30 -0500)
committerKathy Lussier <klussier@masslnc.org>
Wed, 2 Mar 2016 16:50:24 +0000 (11:50 -0500)
Repairs circ ID filter to allow all items in circ history to clear when
patrons disable circulation history.

open-ils.cstore will fail on {in => undef} queries.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm

index 873ad3b..40bb6a6 100644 (file)
@@ -4279,11 +4279,12 @@ sub user_circ_history {
         $limits{limit} = $options->{limit} if defined $options->{limit};
     }
 
-    my $circ_id_list = $options->{circ_ids} ? $options->{circ_ids} : undef;
+    my %circ_id_filter = $options->{circ_ids} ?
+        (id => $options->{circ_ids}) : ();
 
     my $circs = $e->search_action_user_circ_history([
         {   usr => $e->requestor->id,
-            id  => {'in' => $circ_id_list},
+            %circ_id_filter
         },
         {   # order newest to oldest by default
             order_by => {auch => 'xact_start DESC'},