提交 bfdd34c5 编写于 作者: G Grzegorz Bizon

Implement memoization in project correctly this time

上级 b4349fd3
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册