Skip to content
Snippets Groups Projects
Verified Commit 8ea8b46f authored by Tom Teichler's avatar Tom Teichler :beers: Committed by Jonathan Weth
Browse files

Use values_list instead of for-loop

(cherry picked from commit 8a910193)
parent 19243413
No related branches found
No related tags found
1 merge request!733Prepare release 2.0rc6
......@@ -73,7 +73,6 @@ class CustomOAuth2Validator(OAuth2Validator):
}
if "groups" in request.scopes and has_person(request.user):
for group in request.user.person.groups.all():
claims["groups"].append(group.name)
claims["groups"] = request.user.person.groups.values_list("name", flat=True).all()
return claims
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