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-05-26 06:09:21 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-05-26 06:09:21 +0300
commit47ef8c6c530ee1cac0e1046b098755ec949da894 (patch)
treed09c3d5598aad53c0f2c721ce237ff8b1db5f7ec /app/models/namespace.rb
parenteb90b0642d7949bfa03c8e9b5f39d211934fb0b5 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/namespace.rb')
-rw-r--r--app/models/namespace.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/namespace.rb b/app/models/namespace.rb
index 865ca85d982..ec4b9786945 100644
--- a/app/models/namespace.rb
+++ b/app/models/namespace.rb
@@ -632,7 +632,7 @@ class Namespace < ApplicationRecord
return
end
- if parent.project_namespace?
+ if parent&.project_namespace?
errors.add(:parent_id, _('project namespace cannot be the parent of another namespace'))
end