summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-07-14 14:07:03 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-07-14 14:07:03 +0200
commit7b0e79730f486b4e2a7c2405343ac2ec8ad327a4 (patch)
tree4ba1eed2ba896104b95fef7e07a166d3f56d3c9c
parent7c0d8c8cfc811ff65120f80f2ba212fe33f9fd47 (diff)
downloadgitlab-ce-7b0e79730f486b4e2a7c2405343ac2ec8ad327a4.tar.gz
Memoize result of checking container images on project
-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