about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--app/models/report.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/report.rb b/app/models/report.rb
index 3dd8a6fdd..8ba2dd8fd 100644
--- a/app/models/report.rb
+++ b/app/models/report.rb
@@ -129,6 +129,6 @@ class Report < ApplicationRecord
   def validate_rule_ids
     return unless violation?
 
-    errors.add(:rule_ids, I18n.t('reports.errors.invalid_rules')) unless rules.size == rule_ids.size
+    errors.add(:rule_ids, I18n.t('reports.errors.invalid_rules')) unless rules.size == rule_ids&.size
   end
 end