if an open circ exists for the same user, go ahead and return the circ, regardless...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 21 Sep 2009 13:59:02 +0000 (13:59 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 21 Sep 2009 13:59:02 +0000 (13:59 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@14069 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm

index 96d46e5..7119135 100644 (file)
@@ -800,6 +800,8 @@ sub do_copy_checks {
             my $payload; # event payload
 
             if($old_circ->usr == $self->patron->id) {
+                
+                $payload = {old_circ => $old_circ};
 
                 # If there is an open circulation on the checkout item and an auto-renew 
                 # interval is defined, inform the caller that they should go 
@@ -816,10 +818,7 @@ sub do_copy_checks {
                     my $checkout_time = DateTime::Format::ISO8601->new->parse_datetime( clense_ISO8601($old_circ->xact_start) );
 
                     if(DateTime->now > $checkout_time->add(seconds => $intvl_seconds)) {
-                        $payload = {
-                            old_circ => $old_circ,
-                            auto_renew => 1
-                        }
+                        $payload->{auto_renew} = 1;
                     }
                 }
             }