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
)];
# If we have a candidate copy, then:
- if ($circs) {
+ if (scalar(@$circs)) {
my $circ = $circs->[0];
$log->info("Recalling circ ID : " . $circ->id);
# 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.");