mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-18 07:38:42 +00:00
Fix nil error when submitting report without rule_ids
(#17713)
This commit is contained in:
parent
edf09ec747
commit
292c75aa31
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue