[open-ils-commits] r15646 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Mar 1 14:59:00 EST 2010


Author: phasefx
Date: 2010-03-01 14:58:55 -0500 (Mon, 01 Mar 2010)
New Revision: 15646

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm
Log:
Don't assume an options parameter was passed, and remove the ability to 'flesh your way to China'

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm	2010-03-01 16:21:08 UTC (rev 15645)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm	2010-03-01 19:58:55 UTC (rev 15646)
@@ -1202,22 +1202,21 @@
         "order_by"=>[{"class"=>"atev", "field"=>"run_time", "direction"=>"desc"}]
     };
 
-    if (defined $options->{state}) {
+    if ($options && defined $options->{state}) {
         $query->{'where'}{'state'} = $options->{state}
     }
 
-    if (defined $options->{start_time}) {
+    if ($options && defined $options->{start_time}) {
         $query->{'where'}{'start_time'} = $options->{start_time};
     }
 
-    if (defined $options->{order_by}) {
+    if ($options && defined $options->{order_by}) {
         $query->{'order_by'} = $options->{order_by};
     }
     my $po_events = $e->json_query($query);
 
-    my $flesh_fields = $options->{flesh_fields} || {};
-    my $flesh_depth = $options->{flesh_depth} || 1;
-    $flesh_fields->{atev} = ['event_def'] unless $flesh_fields->{atev};
+    my $flesh_fields = ( 'atev' => [ 'event_def' ] };
+    my $flesh_depth = 1;
 
     for my $id (@$po_events) {
         my $event = $e->retrieve_action_trigger_event([



More information about the open-ils-commits mailing list