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
e5f91e52
Commit
e5f91e52
authored
Sep 06, 2017
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor code based on feedback
parent
89ca01eb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
app/models/ci/build.rb
app/models/ci/build.rb
+1
-1
lib/gitlab/import_export/project_tree_restorer.rb
lib/gitlab/import_export/project_tree_restorer.rb
+1
-3
No files found.
app/models/ci/build.rb
View file @
e5f91e52
...
...
@@ -452,7 +452,7 @@ module Ci
end
def
serializable_hash
(
options
=
{})
super
(
options
.
merge
(
when:
read_attribute
(
:when
)
))
super
(
options
).
merge
(
when:
read_attribute
(
:when
))
end
private
...
...
lib/gitlab/import_export/project_tree_restorer.rb
View file @
e5f91e52
...
...
@@ -53,11 +53,9 @@ module Gitlab
# Finally, it updates each attribute in the newly imported project.
def
create_relations
default_relation_list
.
each
do
|
relation
|
next
unless
relation
.
is_a?
(
Hash
)
||
@tree_hash
[
relation
.
to_s
].
present?
if
relation
.
is_a?
(
Hash
)
create_sub_relations
(
relation
,
@tree_hash
)
els
e
els
if
@tree_hash
[
relation
.
to_s
].
present?
relation_key
=
relation
.
is_a?
(
Hash
)
?
relation
.
keys
.
first
:
relation
save_relation_hash
(
@tree_hash
[
relation_key
.
to_s
],
relation_key
)
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