1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00

Handle destroyed records in action log

This commit is contained in:
Matt Jankowski 2024-05-27 09:34:59 -04:00
parent aac347e552
commit ee5b77aa49

View file

@ -4,7 +4,7 @@ module AccountableConcern
extend ActiveSupport::Concern extend ActiveSupport::Concern
def log_action(action, target) def log_action(action, target)
return unless target.previous_changes.any? return unless target.previous_changes.any? || target.destroyed?
Admin::ActionLog.create( Admin::ActionLog.create(
account: current_account, account: current_account,