diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-07-14 14:25:14 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-07-14 14:25:14 +0200 |
commit | bfdd34c52a085cec25b439ed41a3c07901bb9708 (patch) | |
tree | de81e651a39dd893a993382a18bdd0888fe75ede /app | |
parent | b4349fd33130cb4796e087826990930822efc049 (diff) | |
download | gitlab-ce-bfdd34c52a085cec25b439ed41a3c07901bb9708.tar.gz |
Implement memoization in project correctly this timefix/gb/recover-from-renaming-project-with-container-images
Diffstat (limited to 'app')
-rw-r--r-- | app/models/project.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index d0b8055636a..e9d93cda1c4 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -486,7 +486,9 @@ class Project < ActiveRecord::Base end def has_container_registry_tags? - @images ||= container_repositories.to_a.any?(&:has_tags?) || + return @images if defined?(@images) + + @images = container_repositories.to_a.any?(&:has_tags?) || has_root_container_repository_tags? end |