BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
build.rb
app/models/ci/build.rb
+1
-1
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