summaryrefslogtreecommitdiff
path: root/app/models/issue.rb
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-11-14 12:12:01 +0000
committerPhil Hughes <me@iamphill.com>2016-11-14 12:12:01 +0000
commitb16780f76671ba704bfc4ee75d1f555b4dfc3035 (patch)
tree20aa7741a6db3c5d6b1c8fe463223e11a1055b84 /app/models/issue.rb
parent763a89a301e36e102ecefe6cfa452fc57cd661c2 (diff)
downloadgitlab-ce-b16780f76671ba704bfc4ee75d1f555b4dfc3035.tar.gz
Fixed issue boards when not logged inissue-boards-signed-out-state
Diffstat (limited to 'app/models/issue.rb')
-rw-r--r--app/models/issue.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb
index adbca510ef7..4a4017003d8 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -266,7 +266,7 @@ class Issue < ActiveRecord::Base
def as_json(options = {})
super(options).tap do |json|
- json[:subscribed] = subscribed?(options[:user]) if options.has_key?(:user)
+ json[:subscribed] = subscribed?(options[:user]) if options.has_key?(:user) && options[:user]
if options.has_key?(:labels)
json[:labels] = labels.as_json(