Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
7d17fcea
Commit
7d17fcea
authored
Apr 06, 2017
by
James Edwards-Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix projected import failing on missing relations
parent
ca9cded4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
lib/gitlab/import_export/project_tree_restorer.rb
lib/gitlab/import_export/project_tree_restorer.rb
+5
-1
No files found.
lib/gitlab/import_export/project_tree_restorer.rb
View file @
7d17fcea
...
...
@@ -52,7 +52,11 @@ module Gitlab
create_sub_relations
(
relation
,
@tree_hash
)
if
relation
.
is_a?
(
Hash
)
relation_key
=
relation
.
is_a?
(
Hash
)
?
relation
.
keys
.
first
:
relation
relation_hash
=
create_relation
(
relation_key
,
@tree_hash
[
relation_key
.
to_s
])
relation_hash_list
=
@tree_hash
[
relation_key
.
to_s
]
next
unless
relation_hash_list
relation_hash
=
create_relation
(
relation_key
,
relation_hash_list
)
saved
<<
restored_project
.
append_or_update_attribute
(
relation_key
,
relation_hash
)
end
saved
.
all?
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment