summaryrefslogtreecommitdiff
path: root/app/serializers
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-12-15 22:06:39 +0100
committerKamil Trzcinski <ayufan@ayufan.eu>2016-12-15 22:06:39 +0100
commitb2508cbdaf600bbb8fb2fd56c9891304502429b3 (patch)
tree45494ec34713bd874e8d52b4f272963242cdbd92 /app/serializers
parent9eed507dafbfdd09fcd51b970d633ba0fd764d78 (diff)
downloadgitlab-ce-b2508cbdaf600bbb8fb2fd56c9891304502429b3.tar.gz
Improve performance of Pipelines API
Diffstat (limited to 'app/serializers')
-rw-r--r--app/serializers/pipeline_entity.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/serializers/pipeline_entity.rb b/app/serializers/pipeline_entity.rb
index 613a18e6357..3ede0fb0f53 100644
--- a/app/serializers/pipeline_entity.rb
+++ b/app/serializers/pipeline_entity.rb
@@ -33,9 +33,7 @@ class PipelineEntity < Grape::Entity
pipeline.yaml_errors.present?
end
- expose :stuck?, as: :stuck do |pipeline|
- pipeline.builds.any?(&:stuck?)
- end
+ expose :stuck?, as: :stuck
end
expose :ref do