Add uniqueness for RunnerNamespace
This commit is contained in:
parent
adc860ae0e
commit
bf74e69eeb
|
@ -5,5 +5,7 @@ module Ci
|
|||
belongs_to :runner, inverse_of: :runner_namespaces, validate: true
|
||||
belongs_to :namespace, inverse_of: :runner_namespaces, class_name: '::Namespace'
|
||||
belongs_to :group, class_name: '::Group', foreign_key: :namespace_id
|
||||
|
||||
validates :runner_id, uniqueness: { scope: :namespace_id }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue