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
9d54da23
Commit
9d54da23
authored
Oct 10, 2017
by
Bob Van Landuyt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reuse `base_and_ancestors` for `ancestors` in `GroupHierarchy`
parent
e55886b3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
group_hierarchy.rb
lib/gitlab/group_hierarchy.rb
+1
-2
No files found.
lib/gitlab/group_hierarchy.rb
View file @
9d54da23
...
...
@@ -30,8 +30,7 @@ module Gitlab
# reached. So all ancestors *lower* than the specified ancestor will be
# included.
def
ancestors
(
upto:
nil
)
read_only
(
base_and_ancestors_cte
(
upto
).
apply_to
(
model
.
all
))
.
where
.
not
(
id:
ancestors_base
.
select
(
:id
))
base_and_ancestors
(
upto:
upto
).
where
.
not
(
id:
ancestors_base
.
select
(
:id
))
end
# Returns a relation that includes the ancestors_base set of groups
...
...
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