From 0fe79e5aaeaeffb894b0966caabffcb1ca9f9c41 Mon Sep 17 00:00:00 2001 From: dbs Date: Tue, 23 Nov 2010 20:58:28 +0000 Subject: [PATCH] Further fixes for hold-driven recalls Force a scalar context on the array reference of circs returned from the search clause to short-circuit the recall processing if we have no applicable circs to work through. Also, open-ils.trigger.event.autocreate needs a Fieldmapper object, not a raw CDBI object, so invoke the to_fieldmapper() method to convert it accordingly (thanks to miker for the assist!) git-svn-id: svn://svn.open-ils.org/ILS/trunk@18837 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../perlmods/OpenILS/Application/Storage/Publisher/action.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm index b925fd4074..53c517a05a 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm @@ -1550,7 +1550,7 @@ sub process_recall { )]; # If we have a candidate copy, then: - if ($circs) { + if (scalar(@$circs)) { my $circ = $circs->[0]; $log->info("Recalling circ ID : " . $circ->id); @@ -1581,7 +1581,7 @@ sub process_recall { # Create trigger event for notifying current user my $ses = OpenSRF::AppSession->create('open-ils.trigger'); - $ses->request('open-ils.trigger.event.autocreate', 'circ.recall.target', $circ, $circ->circ_lib->id); + $ses->request('open-ils.trigger.event.autocreate', 'circ.recall.target', $circ->to_fieldmapper(), $circ->circ_lib->id); } $log->info("Processing of hold ".$hold->id." for recall is now complete."); -- 2.43.2