diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-16 21:11:26 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-16 21:11:26 +0300 |
commit | 8fa0c53e26c947ac647b8067fde3e9673b77b1a6 (patch) | |
tree | da32e7224125973e9e87d3856fb7e672ff41c8b1 /app/models/namespace.rb | |
parent | 0552020767452da44de2bf5424096f2cb2ea6bf5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/namespace.rb')
-rw-r--r-- | app/models/namespace.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/namespace.rb b/app/models/namespace.rb index bef68586c66..51c39ad4ec3 100644 --- a/app/models/namespace.rb +++ b/app/models/namespace.rb @@ -91,6 +91,7 @@ class Namespace < ApplicationRecord validates :name, presence: true, length: { maximum: 255 } + validates :name, uniqueness: { scope: [:type, :parent_id] }, if: -> { parent_id.present? } validates :description, length: { maximum: 255 } |