diff options
author | Stan Hu <stanhu@gmail.com> | 2018-08-31 14:57:37 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-08-31 15:03:17 -0700 |
commit | 965f9113b05695236bb682dd7ff7cdb5a5232281 (patch) | |
tree | fe07899873009dfa8e0428898161c96540552752 /app/helpers | |
parent | 472f2d566633df6c1dee1f703b06958b9a0a2cd8 (diff) | |
download | gitlab-ce-965f9113b05695236bb682dd7ff7cdb5a5232281.tar.gz |
Fix importers not assigning a new default group
The Bitbucket Server as well as other importers pass in a group name to be
created (assuming the user has permission) and attempt to dedupe that with an
existing group. However, the group *name* is not guaranteed to be
unique, but the *path* is.
Closes #50110
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/namespaces_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/namespaces_helper.rb b/app/helpers/namespaces_helper.rb index 30585cb403d..6535afb6425 100644 --- a/app/helpers/namespaces_helper.rb +++ b/app/helpers/namespaces_helper.rb @@ -55,7 +55,7 @@ module NamespacesHelper # group if one exists by that name to prevent duplicates. def dedup_extra_group(extra_group) unless extra_group.persisted? - existing_group = Group.find_by(name: extra_group.name) + existing_group = Group.find_by(path: extra_group.path) extra_group = existing_group if existing_group&.persisted? end |