Skip to content
Snippets Groups Projects
Commit 9d83d520 authored by Luke Barnard's avatar Luke Barnard
Browse files

Use a generator instead of a list

parent 5b48eec4
No related branches found
No related tags found
No related merge requests found
......@@ -275,11 +275,11 @@ class ApplicationService(object):
def get_groups_for_user(self, user_id):
"""Get the groups that this user is associated with by this AS
"""
return [
return (
regex_obj["group_id"]
for regex_obj in self.namespaces[ApplicationService.NS_USERS]
if "group_id" in regex_obj and regex_obj["regex"].match(user_id)
]
)
def is_rate_limited(self):
return self.rate_limited
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment