Commit 8c40bbbe authored by Shinya Maeda's avatar Shinya Maeda

Switch to preload. Remove unncecessary associations.

parent 20a07d26
......@@ -17,7 +17,7 @@ module API
get ':id/pipeline_schedules' do
authorize! :read_pipeline_schedule, user_project
pipeline_schedules = user_project.pipeline_schedules.includes([:owner, last_pipeline: {statuses: :latest}])
pipeline_schedules = user_project.pipeline_schedules.preload([:owner, :last_pipeline])
present paginate(pipeline_schedules), with: Entities::PipelineSchedule
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment