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
ee2744c6
Commit
ee2744c6
authored
Sep 22, 2017
by
Bob Van Landuyt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't wrap arrays twice: `children` are already wrapped in an array
We do the wrapping in an array in represent_hierarchy for children.
parent
e13753fc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
group_child_serializer.rb
app/serializers/group_child_serializer.rb
+2
-2
No files found.
app/serializers/group_child_serializer.rb
View file @
ee2744c6
...
...
@@ -27,8 +27,8 @@ class GroupChildSerializer < BaseSerializer
if
children
.
is_a?
(
GroupDescendant
)
represent_hierarchy
(
children
.
hierarchy
(
hierarchy_root
),
opts
).
first
else
hierarchies
=
Array
.
wrap
(
GroupDescendant
.
merge_hierarchies
(
children
,
hierarchy_root
)
)
hierarchies
.
map
{
|
hierarchy
|
represent_hierarchy
(
hierarchy
,
opts
)
}.
flatten
hierarchies
=
GroupDescendant
.
merge_hierarchies
(
children
,
hierarchy_root
)
represent_hierarchy
(
hierarchies
,
opts
)
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