summaryrefslogtreecommitdiff
path: root/app/controllers/projects_controller.rb
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-03-15 14:38:47 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-03-15 14:42:02 +0800
commit668a5b9fe1712ba082e4b0ba6d6bf54bc5691a49 (patch)
tree7448364bf73bb84deed658ece2dc3b75234de749 /app/controllers/projects_controller.rb
parent253b61d2a03fe04877cedb88260dbb69f59e7e89 (diff)
downloadgitlab-ce-668a5b9fe1712ba082e4b0ba6d6bf54bc5691a49.tar.gz
Fix projects without repo and wiki
When repo and wiki are disabled for a project, we're showing issues so we'll need to set @issuable_meta_data otherwise it would be giving nil errors. See: https://sentry.gitlap.com/gitlab/staginggitlabcom/issues/23106/
Diffstat (limited to 'app/controllers/projects_controller.rb')
-rw-r--r--app/controllers/projects_controller.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 3e2015b7d5e..16e702073b2 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -267,8 +267,9 @@ class ProjectsController < Projects::ApplicationController
@project_wiki = @project.wiki
@wiki_home = @project_wiki.find_page('home', params[:version_id])
elsif @project.feature_available?(:issues, current_user)
- @issues = issues_collection
- @issues = @issues.page(params[:page])
+ @issues = issues_collection.page(params[:page])
+ @collection_type = 'Issue'
+ @issuable_meta_data = issuable_meta_data(@issues, @collection_type)
end
render :show