$client->respond($event);
}
+ $e->rollback;
+
return undef;
}
__PACKAGE__->register_method(
$query->[0]->{'+atevdef'} = {granularity => undef};
}
- return new_editor(xact=>1)->search_action_trigger_event(
+ my $e = new_editor(xact=>1);
+ my $events = $e->search_action_trigger_event(
$query, { idlist=> 1, timeout => 7200, substream => 1 }
);
+ $e->rollback;
+
+ return $events;
}
__PACKAGE__->register_method(
api_name => 'open-ils.trigger.event.find_pending',
# returns the calculated copy price
get_copy_price => sub {
my $copy_id = shift;
- return $U->get_copy_price(new_editor(xact=>1), $copy_id);
+ my $e = new_editor(xact=>1);
+ my $price = $U->get_copy_price($e, $copy_id);
+ $e->rollback;
+ return $price;
},
get_org_unit => sub {
# given a copy, returns the title and author in a hash
get_copy_bib_basics => sub {
my $copy_id = shift;
- my $copy = new_editor(xact=>1)->retrieve_asset_copy([
+ my $e = new_editor(xact=>1);
+ my $copy = $e->retrieve_asset_copy([
$copy_id,
{
flesh => 2,
}
}
]);
+ $e->rollback;
if($copy->call_number->id == -1) {
return {
title => $copy->dummy_title,
}
}
- my $location = new_editor(xact=>1)->retrieve_asset_copy_location([
+ my $e = new_editor(xact=>1);
+ my $location = $e->retrieve_asset_copy_location([
$winning_location, {}
]);
+ $e->rollback;
return $location;
},