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
path: root/lib
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2018-02-02 11:57:52 +0300
committerStan Hu <stanhu@gmail.com>2018-02-02 17:35:40 +0300
commitf677aa7d574c9399400fdeeeaf0e20007bdd57f8 (patch)
tree73979ed07cd7a897255e62c120a28629c8aec400 /lib
parent54a575f1bbba44573ab92dc58a4242f1ee734c5d (diff)
fix label issue
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/import_export/relation_factory.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/gitlab/import_export/relation_factory.rb b/lib/gitlab/import_export/relation_factory.rb
index cb711a83433..759833a5ee5 100644
--- a/lib/gitlab/import_export/relation_factory.rb
+++ b/lib/gitlab/import_export/relation_factory.rb
@@ -139,13 +139,12 @@ module Gitlab
end
def setup_label
- return unless @relation_hash['type'] == 'GroupLabel'
-
# If there's no group, move the label to a project label
- if @relation_hash['group_id']
+ if @relation_hash['type'] == 'GroupLabel' && @relation_hash['group_id']
@relation_hash['project_id'] = nil
@relation_name = :group_label
else
+ @relation_hash['group_id'] = nil
@relation_hash['type'] = 'ProjectLabel'
end
end