diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-04-21 15:20:18 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-04-21 15:20:18 +0000 |
commit | d3a788da5b3871331b967e692d78a808a31f08fa (patch) | |
tree | 06937ea26e95cf3a79284b8cc7e55b14523d7904 /app | |
parent | 38c52ab1f6fc216de6d240bffaa8c75dddcc6987 (diff) | |
parent | 67d380136c3fabd60dc86b7e6c0ce4f7c4800d36 (diff) | |
download | gitlab-ce-d3a788da5b3871331b967e692d78a808a31f08fa.tar.gz |
Merge branch 'sh-fix-issue-31215-2' into 'master'
Based on !10841 Fix Error 500 when referencing issue with project in pending delete
Closes #31215
See merge request !10843
Diffstat (limited to 'app')
-rw-r--r-- | app/models/issue.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb index d39ae3a6c92..305fc01f041 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -199,7 +199,7 @@ class Issue < ActiveRecord::Base # Returns `true` if the current issue can be viewed by either a logged in User # or an anonymous user. def visible_to_user?(user = nil) - return false unless project.feature_available?(:issues, user) + return false unless project && project.feature_available?(:issues, user) user ? readable_by?(user) : publicly_visible? end |