Allow reporting of anonymous notes
[rails.git] / app / controllers / issues_controller.rb
index e79a03203dfba0a32d7cc4f07b9cb1c783e2c386..dc04606f7b9044233a73a5ea04d140c2b2114db8 100644 (file)
@@ -50,7 +50,7 @@ class IssuesController < ApplicationController
     @read_reports = @issue.read_reports
     @unread_reports = @issue.unread_reports
     @comments = @issue.comments
-    @related_issues = @issue.reported_user.issues.where(:assigned_role => current_user.roles.map(&:role))
+    @related_issues = @issue.reported_user.issues.where(:assigned_role => current_user.roles.map(&:role)) if @issue.reported_user
     @new_comment = IssueComment.new(:issue => @issue)
   end