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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
49539779
Commit
49539779
authored
Apr 12, 2016
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix spec
parent
eb55cb92
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
app/services/projects/import_export/project_tree_restorer.rb
app/services/projects/import_export/project_tree_restorer.rb
+4
-2
No files found.
app/services/projects/import_export/project_tree_restorer.rb
View file @
49539779
...
...
@@ -23,16 +23,18 @@ module Projects
end
def
create_relations
(
relation_list
=
default_relation_list
,
tree_hash
=
@tree_hash
)
saved
=
[]
relation_list
.
each
do
|
relation
|
if
relation
.
is_a?
(
Hash
)
create_sub_relations
(
relation
,
tree_hash
)
end
relation_key
=
relation
.
is_a?
(
Hash
)
?
relation
.
keys
.
first
:
relation
relation_hash
=
create_relation
(
relation_key
,
tree_hash
[
relation_key
.
to_s
])
project
.
update_attribute
(
relation_key
,
relation_hash
)
saved
<<
project
.
update_attribute
(
relation_key
,
relation_hash
)
# FIXME
# next if tree_hash[relation.to_s].blank?
end
saved
.
all?
end
def
default_relation_list
...
...
@@ -56,7 +58,7 @@ module Projects
relation
.
values
.
flatten
.
each
do
|
sub_relation
|
relation_hash
=
relation_item
[
sub_relation
.
to_s
]
next
if
relation_hash
.
blank?
sub_relation_object
=
relation_from_factory
(
relation
,
relation_hash
)
sub_relation_object
=
relation_from_factory
(
sub_
relation
,
relation_hash
)
relation_item
[
sub_relation
.
to_s
]
=
sub_relation_object
end
end
...
...
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