From: Jason Stephenson Date: Wed, 13 Mar 2019 16:37:23 +0000 (-0400) Subject: LP 1819796: Fix method call on undefined value in generate_fines X-Git-Url: http://git.equinoxoli.org/?p=evergreen-equinox.git;a=commitdiff_plain;h=090f86427d71eab85fc9b902b715711657e98cbd;hp=1c061dd30a02a03bfe9d8043057b28e87aa910b2 LP 1819796: Fix method call on undefined value in generate_fines The below message repeats in the open-ils.storage_stderr.log: Caught error from 'run' method: Can't call method "search_where" on an undefined value at /usr/local/share/perl/5.26.1/OpenILS/Application/Storage/Publisher/action.pm line 1014. This commit removes an errant ->search_where on a CStoreEditor call to make that message go away. Also, delete some lines of code that were commented out at the time the code was converted to use CStoreEditor. Signed-off-by: Jason Stephenson Signed-off-by: Dan Wells --- 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 afb508e..4a49804 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 @@ -1002,16 +1002,9 @@ sub generate_fines { my $circs; my $editor = new_editor; if ($circ_id) { -# my $circ; -# if ($circ = action::circulation->search_where( { id => $circ_id, stop_fines => undef } )) { -# $circ = action::circulation->retrieve($circ_id)->to_fieldmapper; -# } elsif ($circ = booking::reservation->search_where( { id => $circ_id, return_time => undef, cancel_time => undef } )) { -# $circ = booking::reservation->retrieve($circ_id)->to_fieldmapper; -# } -# $circs = [$circ] if ($circ); $circs = $editor->search_action_circulation( { id => $circ_id, stop_fines => undef } ); unless (@$circs) { - $circs = $editor->search_booking_reservation->search_where( { id => $circ_id, return_time => undef, cancel_time => undef } ); + $circs = $editor->search_booking_reservation( { id => $circ_id, return_time => undef, cancel_time => undef } ); } } else { $circs = [overdue_circs(undef, 1, 1, 1)];