Add explicit dependent: nil
to associations (#28169)
This commit is contained in:
parent
1564799952
commit
f70f39dd04
10 changed files with 20 additions and 30 deletions
|
@ -84,12 +84,12 @@ class User < ApplicationRecord
|
|||
belongs_to :role, class_name: 'UserRole', optional: true
|
||||
accepts_nested_attributes_for :account
|
||||
|
||||
has_many :applications, class_name: 'Doorkeeper::Application', as: :owner
|
||||
has_many :backups, inverse_of: :user
|
||||
has_many :invites, inverse_of: :user
|
||||
has_many :applications, class_name: 'Doorkeeper::Application', as: :owner, dependent: nil
|
||||
has_many :backups, inverse_of: :user, dependent: nil
|
||||
has_many :invites, inverse_of: :user, dependent: nil
|
||||
has_many :markers, inverse_of: :user, dependent: :destroy
|
||||
has_many :webauthn_credentials, dependent: :destroy
|
||||
has_many :ips, class_name: 'UserIp', inverse_of: :user
|
||||
has_many :ips, class_name: 'UserIp', inverse_of: :user, dependent: nil
|
||||
|
||||
has_one :invite_request, class_name: 'UserInviteRequest', inverse_of: :user, dependent: :destroy
|
||||
accepts_nested_attributes_for :invite_request, reject_if: ->(attributes) { attributes['text'].blank? && !Setting.require_invite_text }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue