Remove 'dependent: :destroy' from ProtectedRef has_many :"#{type}_access_levels"
This commit is contained in:
parent
7edeccfc7f
commit
bd1be9bb43
1 changed files with 1 additions and 1 deletions
|
@ -23,7 +23,7 @@ module ProtectedRef
|
|||
# If we don't `protected_branch` or `protected_tag` would be empty and
|
||||
# `project` cannot be delegated to it, which in turn would cause validations
|
||||
# to fail.
|
||||
has_many :"#{type}_access_levels", dependent: :destroy, inverse_of: self.model_name.singular # rubocop:disable Cop/ActiveRecordDependent
|
||||
has_many :"#{type}_access_levels", inverse_of: self.model_name.singular # rubocop:disable Cop/ActiveRecordDependent
|
||||
|
||||
validates :"#{type}_access_levels", length: { is: 1, message: "are restricted to a single instance per #{self.model_name.human}." }
|
||||
|
||||
|
|
Loading…
Reference in a new issue