lib/foreman_tasks/dynflow/persistence.rb in foreman-tasks-0.15.11 vs lib/foreman_tasks/dynflow/persistence.rb in foreman-tasks-0.16.0

- old
+ new

@@ -34,10 +34,9 @@ task.update_from_dynflow(data.merge(:start_at => delayed_plan[:start_at], :start_before => delayed_plan[:start_before])) when :planning task = ::ForemanTasks::Task::DynflowTask.where(:external_id => execution_plan_id).first task.update_from_dynflow(data) - Lock.owner!(::User.current, task.id) if ::User.current && ::User.current.id.present? else if (task = ::ForemanTasks::Task::DynflowTask.where(:external_id => execution_plan_id).first) unless task.state.to_s == data[:state].to_s task.update_from_dynflow(data) end