From b78c9a8981d783d101c939e22b08ae7d0f5f4676 Mon Sep 17 00:00:00 2001 From: miker Date: Fri, 29 May 2009 18:05:29 +0000 Subject: [PATCH] be more strict about going away after short-circut code; check earlier for hold validity git-svn-id: svn://svn.open-ils.org/ILS/trunk@13262 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../src/perlmods/OpenILS/Application/Storage/Publisher/action.pm | 5 +++-- 1 file changed, 3 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 8a9495797..5b178ce36 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm @@ -884,6 +884,8 @@ sub new_hold_copy_targeter { $hold->remove_from_object_index(); $hold = action::hold_request->retrieve( $hold->id ); + die "OK\n" if (!$hold or $hold->capture_time or $hold->cancel_time); + # remove old auto-targeting maps my @oldmaps = action::hold_copy_map->search( hold => $hold->id ); $_->delete for (@oldmaps); @@ -892,10 +894,9 @@ sub new_hold_copy_targeter { my $ex_time = $parser->parse_datetime( clense_ISO8601( $hold->expire_time ) ); $hold->update( { cancel_cause => 1, cancel_time => 'now' } ) if ( DateTime->compare($ex_time, DateTime->now) < 0 ); $self->method_lookup('open-ils.storage.transaction.commit')->run; + die "OK\n"; } - die "OK\n" if (!$hold or $hold->capture_time or $hold->cancel_time); - my $all_copies = []; # find filters for MR holds -- 2.11.0