Skip to content

Instantly share code, notes, and snippets.

@berick
Created September 23, 2016 17:40
Show Gist options
  • Save berick/94cbec013b8b5938f01f838a8070c641 to your computer and use it in GitHub Desktop.
Save berick/94cbec013b8b5938f01f838a8070c641 to your computer and use it in GitHub Desktop.
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Reactor.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Reactor.pm
@@ -454,8 +454,10 @@ sub run_TT {
$t_o->is_error( ($error) ? 't' : 'f' );
$logger->info("trigger: writing " . length($t_o->data) . " bytes to template output");
+ $env->{EventProcessor}->editor->rollback;
$env->{EventProcessor}->editor->xact_begin;
$t_o = $env->{EventProcessor}->editor->create_action_trigger_event_output( $t_o );
+ $env->{EventProcessor}->editor->commit;
my $state = (ref $$env{event} eq 'ARRAY') ? $$env{event}->[0]->state : $env->{event}->state;
my $key = ($error) ? 'error_output' : 'template_output';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment