fetch last updated event before comitting to stay in the xact
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 23 Sep 2010 07:17:00 +0000 (07:17 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 23 Sep 2010 07:17:00 +0000 (07:17 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@17914 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Trigger/EventGroup.pm

index 34b9423..a5c742d 100644 (file)
@@ -212,11 +212,11 @@ sub update_state {
     if (scalar(@oks) < scalar(@{ $self->ids })) {
         $self->editor->xact_rollback;
         return undef;
-    } else {
-        $ok = $self->editor->xact_commit;
-    }
+    } 
 
     my $updated = $self->editor->retrieve_action_trigger_event($last_updated);
+    $ok = $self->editor->xact_commit;
+
     if ($ok) {
         for my $event ( @{ $self->events } ) {
             my $e = $event->event;