Commit bf74e69e authored by Kamil Trzciński's avatar Kamil Trzciński Committed by Dylan Griffith

Add uniqueness for RunnerNamespace

parent adc860ae
...@@ -5,5 +5,7 @@ module Ci ...@@ -5,5 +5,7 @@ module Ci
belongs_to :runner, inverse_of: :runner_namespaces, validate: true belongs_to :runner, inverse_of: :runner_namespaces, validate: true
belongs_to :namespace, inverse_of: :runner_namespaces, class_name: '::Namespace' belongs_to :namespace, inverse_of: :runner_namespaces, class_name: '::Namespace'
belongs_to :group, class_name: '::Group', foreign_key: :namespace_id belongs_to :group, class_name: '::Group', foreign_key: :namespace_id
validates :runner_id, uniqueness: { scope: :namespace_id }
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment