Merge remote-tracking branch 'parent/main' into upstream-20241107

This commit is contained in:
KMY 2024-11-07 08:33:20 +09:00
commit a003c2db89
98 changed files with 2002 additions and 590 deletions

View file

@ -83,6 +83,9 @@ class Notification < ApplicationRecord
moderation_warning: {
filterable: false,
}.freeze,
annual_report: {
filterable: false,
}.freeze,
'admin.sign_up': {
filterable: false,
}.freeze,
@ -124,6 +127,7 @@ class Notification < ApplicationRecord
belongs_to :report, inverse_of: false
belongs_to :account_warning, inverse_of: false
belongs_to :account_relationship_severance_event, inverse_of: false
belongs_to :generated_annual_report, inverse_of: false
end
validates :type, inclusion: { in: TYPES }
@ -344,7 +348,7 @@ class Notification < ApplicationRecord
self.from_account_id = activity&.status&.account_id
when 'Account'
self.from_account_id = activity&.id
when 'AccountRelationshipSeveranceEvent', 'AccountWarning'
when 'AccountRelationshipSeveranceEvent', 'AccountWarning', 'GeneratedAnnualReport'
# These do not really have an originating account, but this is mandatory
# in the data model, and the recipient's account will by definition
# always exist