Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-11-16 21:11:26 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-11-16 21:11:26 +0300
commit8fa0c53e26c947ac647b8067fde3e9673b77b1a6 (patch)
treeda32e7224125973e9e87d3856fb7e672ff41c8b1 /app/models/namespace.rb
parent0552020767452da44de2bf5424096f2cb2ea6bf5 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/namespace.rb')
-rw-r--r--app/models/namespace.rb1
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 }