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:
parent
3835f8286a
commit
e95899fa83
1 changed files with 1 additions and 1 deletions
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue