diff --git a/app/models/foreman_tasks/remote_task.rb b/app/models/foreman_tasks/remote_task.rb index 3e24e15ce..bea2cb47c 100644 --- a/app/models/foreman_tasks/remote_task.rb +++ b/app/models/foreman_tasks/remote_task.rb @@ -42,6 +42,9 @@ def self.batch_trigger(operation, remote_tasks) end def update_from_batch_trigger(data, parent = {}) + # The ID might get overwritten later, but it is a sane default in case of async + # triggering where we only get an id of a remote parent + self.remote_task_id = execution_plan_id if data['result'] == 'success' self.remote_task_id = data['task_id'] self.state = 'triggered'