From 113f5895ad0bfcb40f253394d4ef033556f220a6 Mon Sep 17 00:00:00 2001 From: miker Date: Wed, 3 Jun 2009 00:52:36 +0000 Subject: [PATCH] regression in hold targeting where blanket expire_time is set git-svn-id: svn://svn.open-ils.org/ILS/trunk@13294 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../src/perlmods/OpenILS/Application/Storage/Publisher/action.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 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 5b178ce36..939a0bdf6 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm @@ -892,9 +892,11 @@ sub new_hold_copy_targeter { if ($hold->expire_time) { 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"; + if ( DateTime->compare($ex_time, DateTime->now) < 0 ) { + $hold->update( { cancel_time => 'now' } ); + $self->method_lookup('open-ils.storage.transaction.commit')->run; + die "OK\n"; + } } my $all_copies = []; -- 2.11.0