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
f87e887d
Commit
f87e887d
authored
Feb 03, 2017
by
Nick Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Approvable#number_of_potential_approvers for a nil author
parent
51ed5c99
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
app/models/concerns/approvable.rb
app/models/concerns/approvable.rb
+6
-4
No files found.
app/models/concerns/approvable.rb
View file @
f87e887d
...
@@ -50,11 +50,13 @@ module Approvable
...
@@ -50,11 +50,13 @@ module Approvable
wheres
<<
"id IN (
#{
project
.
group
.
members
.
where
(
has_access
).
select
(
:user_id
).
to_sql
}
)"
wheres
<<
"id IN (
#{
project
.
group
.
members
.
where
(
has_access
).
select
(
:user_id
).
to_sql
}
)"
end
end
User
.
users
=
User
.
active
.
active
.
where
(
"(
#{
wheres
.
join
(
' OR '
)
}
) AND id NOT IN (
#{
approvals
.
select
(
:user_id
).
to_sql
}
)"
).
where
(
"(
#{
wheres
.
join
(
' OR '
)
}
) AND id NOT IN (
#{
approvals
.
select
(
:user_id
).
to_sql
}
)"
)
where
.
not
(
id:
author
.
id
).
count
users
=
users
.
where
.
not
(
id:
author
.
id
)
if
author
users
.
count
end
end
# Users in the list of approvers who have not already approved this MR.
# Users in the list of approvers who have not already approved this MR.
...
...
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