diff options
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/ci/dag_job_entity.rb | 1 | ||||
-rw-r--r-- | app/serializers/ci/dag_pipeline_entity.rb | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/app/serializers/ci/dag_job_entity.rb b/app/serializers/ci/dag_job_entity.rb index b4947319ed1..ed4d4505152 100644 --- a/app/serializers/ci/dag_job_entity.rb +++ b/app/serializers/ci/dag_job_entity.rb @@ -3,6 +3,7 @@ module Ci class DagJobEntity < Grape::Entity expose :name + expose :scheduling_type expose :needs, if: -> (job, _) { job.scheduling_type_dag? } do |job| job.needs.pluck(:name) # rubocop: disable CodeReuse/ActiveRecord diff --git a/app/serializers/ci/dag_pipeline_entity.rb b/app/serializers/ci/dag_pipeline_entity.rb index b615dd2b194..51aa487ec29 100644 --- a/app/serializers/ci/dag_pipeline_entity.rb +++ b/app/serializers/ci/dag_pipeline_entity.rb @@ -2,12 +2,12 @@ module Ci class DagPipelineEntity < Grape::Entity - expose :ordered_stages_with_preloads, as: :stages, using: Ci::DagStageEntity + expose :stages_with_preloads, as: :stages, using: Ci::DagStageEntity private - def ordered_stages_with_preloads - object.ordered_stages.preload(preloaded_relations) # rubocop: disable CodeReuse/ActiveRecord + def stages_with_preloads + object.stages.preload(preloaded_relations) # rubocop: disable CodeReuse/ActiveRecord end def preloaded_relations |