Simplify invited_group_members filter-by-level
This commit is contained in:
parent
e4485d7b68
commit
e2c2bd69f2
|
@ -244,11 +244,11 @@ class ProjectTeam
|
|||
next if numeric_level > link.group_access
|
||||
|
||||
# Make sure we include everyone _above_ the requested level as well
|
||||
invited_group_members =
|
||||
if numeric_level == link.group_access
|
||||
invited_group_members = invited_group_members
|
||||
.where("access_level >= ?", link.group_access)
|
||||
invited_group_members.where("access_level >= ?", link.group_access)
|
||||
else
|
||||
invited_group_members = invited_group_members.public_send(level)
|
||||
invited_group_members.public_send(level)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue