update task_spec for nested attributes