diff --git a/lib/redmine/preparation.rb b/lib/redmine/preparation.rb index c51ecfdb9..8caa98e60 100644 --- a/lib/redmine/preparation.rb +++ b/lib/redmine/preparation.rb @@ -367,7 +367,7 @@ module Redmine menu.push :repository, {:controller => 'repositories', :action => 'show', :repository_id => nil, :path => nil, :rev => nil}, - :if => Proc.new {|p| p.repositories.any? {|r| !r.new_record?}} + :if => Proc.new {|p| Repository.where(project_id: p.id).any?} menu.push :settings, {:controller => 'projects', :action => 'settings'}, :last => true end