summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/serializers/build_serializer.rb2
-rw-r--r--app/serializers/pipeline_serializer.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/serializers/build_serializer.rb b/app/serializers/build_serializer.rb
index 2c9cf99811e..c5dbb391ce0 100644
--- a/app/serializers/build_serializer.rb
+++ b/app/serializers/build_serializer.rb
@@ -7,6 +7,6 @@ class BuildSerializer < BaseSerializer
def represent_status(resource)
data = represent(resource, { only: [:status] })
- data[:status]
+ data.fetch(:status, {})
end
end
diff --git a/app/serializers/pipeline_serializer.rb b/app/serializers/pipeline_serializer.rb
index 62f31d4c5ad..384e881da06 100644
--- a/app/serializers/pipeline_serializer.rb
+++ b/app/serializers/pipeline_serializer.rb
@@ -25,6 +25,6 @@ class PipelineSerializer < BaseSerializer
def represent_status(resource)
data = represent(resource, { only: [{ details: [:status] }] })
- data[:details][:status]
+ data.fetch(:details, {}).fetch(:status, {})
end
end