Merge remote-tracking branch 'parent/main' into kb-upstream-20231026
This commit is contained in:
commit
5448bcf276
313 changed files with 3717 additions and 4735 deletions
|
@ -28,7 +28,7 @@ class AccountWarning < ApplicationRecord
|
|||
suspend: 4_000,
|
||||
}, _suffix: :action
|
||||
|
||||
before_validation :before_validate
|
||||
normalizes :text, with: ->(text) { text.to_s }, apply_to_nil: true
|
||||
|
||||
belongs_to :account, inverse_of: :account_warnings
|
||||
belongs_to :target_account, class_name: 'Account', inverse_of: :strikes
|
||||
|
@ -51,10 +51,4 @@ class AccountWarning < ApplicationRecord
|
|||
def to_log_human_identifier
|
||||
target_account.acct
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def before_validate
|
||||
self.text = '' if text.blank?
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue