Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-12-16 00:06:39 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2016-12-16 00:06:39 +0300
commitb2508cbdaf600bbb8fb2fd56c9891304502429b3 (patch)
tree45494ec34713bd874e8d52b4f272963242cdbd92 /app/serializers
parent9eed507dafbfdd09fcd51b970d633ba0fd764d78 (diff)
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