summaryrefslogtreecommitdiff
path: root/lib/gitlab/import_export/attribute_cleaner.rb
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-10-18 19:31:10 +0200
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-10-19 14:58:28 -0200
commit891e5f4851c2067daba12a1750651170a1583481 (patch)
tree956c8fdc9e9e6f269283ee615c580d4fc0ceb666 /lib/gitlab/import_export/attribute_cleaner.rb
parent2f7260b460f2a893241039115a201c2522fb47ca (diff)
downloadgitlab-ce-891e5f4851c2067daba12a1750651170a1583481.tar.gz
Update specs to cope with new label types and priorities
Fixed all related specs and also changed the logic to handle edge cases. This includes exporting and exporting of group labels, which will get associated with the new group (if any) or they will become normal project labels otherwise. Found other issues to do with not being able to import all labels at once in the beginning of the JSON - code was much simpler when we import all labels and milestones associated to a project first, then the associations will find the already created labels instead of creating them from the associations themselves.
Diffstat (limited to 'lib/gitlab/import_export/attribute_cleaner.rb')
-rw-r--r--lib/gitlab/import_export/attribute_cleaner.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/import_export/attribute_cleaner.rb b/lib/gitlab/import_export/attribute_cleaner.rb
index b9e4042220a..f755a404693 100644
--- a/lib/gitlab/import_export/attribute_cleaner.rb
+++ b/lib/gitlab/import_export/attribute_cleaner.rb
@@ -1,7 +1,7 @@
module Gitlab
module ImportExport
class AttributeCleaner
- ALLOWED_REFERENCES = RelationFactory::PROJECT_REFERENCES + RelationFactory::USER_REFERENCES
+ ALLOWED_REFERENCES = RelationFactory::PROJECT_REFERENCES + RelationFactory::USER_REFERENCES + ['group_id']
def self.clean!(relation_hash:)
relation_hash.reject! do |key, _value|