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
path: root/app
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-07-14 15:07:03 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-07-14 15:07:03 +0300
commit7b0e79730f486b4e2a7c2405343ac2ec8ad327a4 (patch)
tree4ba1eed2ba896104b95fef7e07a166d3f56d3c9c /app
parent7c0d8c8cfc811ff65120f80f2ba212fe33f9fd47 (diff)
Memoize result of checking container images on project
Diffstat (limited to 'app')
-rw-r--r--app/models/project.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index eec9037bd07..d0b8055636a 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -486,7 +486,7 @@ class Project < ActiveRecord::Base
end
def has_container_registry_tags?
- container_repositories.to_a.any?(&:has_tags?) ||
+ @images ||= container_repositories.to_a.any?(&:has_tags?) ||
has_root_container_repository_tags?
end