Tell the abort transit function to not commit our editor on us, basically.
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
my $trans = $e->retrieve_action_transit_copy($transid);
if( $trans ) {
$logger->info("Aborting transit [$transid] on hold [$hid] reset...");
- my $evt = OpenILS::Application::Circ::Transit::__abort_transit($e, $trans, $copy, 1);
+ my $evt = OpenILS::Application::Circ::Transit::__abort_transit($e, $trans, $copy, 1, 1);
$logger->info("Transit abort completed with result $evt");
unless ("$evt" eq 1) {
$e->rollback;
sub __abort_transit {
- my( $e, $transit, $copy, $no_reset_hold ) = @_;
+ my( $e, $transit, $copy, $no_reset_hold, $no_commit ) = @_;
my $evt;
my $hold;
return $e->die_event unless $e->delete_action_transit_copy($transit);
return $e->die_event unless $e->update_asset_copy($copy);
- $e->commit;
+ $e->commit unless $no_commit;
# if this is a hold transit, un-capture/un-target the hold
if($holdtransit and !$no_reset_hold) {