diff options
Diffstat (limited to 'app/serializers/pipeline_serializer.rb')
-rw-r--r-- | app/serializers/pipeline_serializer.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/serializers/pipeline_serializer.rb b/app/serializers/pipeline_serializer.rb index e7a9df8ac4e..e37af63774c 100644 --- a/app/serializers/pipeline_serializer.rb +++ b/app/serializers/pipeline_serializer.rb @@ -37,4 +37,11 @@ class PipelineSerializer < BaseSerializer data = represent(resource, { only: [{ details: [:status] }] }) data.dig(:details, :status) || {} end + + def represent_stages(resource) + return {} unless resource.present? + + data = represent(resource, { only: [{ details: [:stages] }] }) + data.dig(:details, :stages) || [] + end end |