Fix account warnings not being recorded in audit log (#18338)

* Fix account warnings not being recorded in audit log

Fixes #18334

* Only record warnings if they are not associated to another action
lolsob-rspec
Claire 2022-05-06 21:40:20 +02:00 committed by GitHub
parent 3ce9a50930
commit 0e0b96b8e7
1 changed files with 4 additions and 0 deletions

View File

@ -92,6 +92,10 @@ class Admin::AccountAction
text: text_for_warning,
status_ids: status_ids
)
# A log entry is only interesting if the warning contains
# custom text from someone. Otherwise it's just noise.
log_action(:create, @warning) if @warning.text.present? && type == 'none'
end
def process_reports!