]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/report.rb
Merge branch 'pull/3472'
[rails.git] / app / models / report.rb
index 9afedb04ee29a68a0cabf434b549a22ff6dbd1f8..77a96764125bbc8e839d73773a3fbfa50a5d9aa9 100644 (file)
@@ -25,15 +25,12 @@ class Report < ApplicationRecord
   belongs_to :issue, :counter_cache => true
   belongs_to :user
 
-  validates :issue, :presence => true
-  validates :user, :presence => true
   validates :details, :presence => true, :characters => true
   validates :category, :presence => true
 
   def self.categories_for(reportable)
     case reportable.class.name
-    when "DiaryEntry" then %w[spam offensive threat other]
-    when "DiaryComment" then %w[spam offensive threat other]
+    when "DiaryEntry", "DiaryComment" then %w[spam offensive threat other]
     when "User" then %w[spam offensive threat vandal other]
     when "Note" then %w[spam personal abusive other]
     else %w[other]