Skip to content

Instantly share code, notes, and snippets.

@ares
Created February 17, 2017 10:01
Show Gist options
  • Select an option

  • Save ares/bce7f2541f4854b91a0ce2d868fde87d to your computer and use it in GitHub Desktop.

Select an option

Save ares/bce7f2541f4854b91a0ce2d868fde87d to your computer and use it in GitHub Desktop.
diff --git a/app/models/foreman_tasks/concerns/action_triggering.rb b/app/models/foreman_tasks/concerns/action_triggering.rb
index 924c82a..08fe738 100644
--- a/app/models/foreman_tasks/concerns/action_triggering.rb
+++ b/app/models/foreman_tasks/concerns/action_triggering.rb
@@ -152,7 +152,7 @@ module ForemanTasks
run = ::ForemanTasks.dynflow.world.execute(@execution_plan.id)
if @dynflow_sync_action
run.wait
- if run.value.error?
+ if run.value.try(:error?)
task = ForemanTasks::Task::DynflowTask.where(:external_id => @execution_plan.id).first!
raise ForemanTasks::TaskError, task
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment