Skip to content

Commit ed3500f

Browse files
committed
Remove conditional in favor of record slice
1 parent a398aac commit ed3500f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

oauth_provider/oauth2/validator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def save_bearer_token(self, token, request, *args, **kwargs):
186186
datetime.now() + timedelta(seconds=token['expires_in'])),
187187
})
188188
redirect_uris = request.client.redirect_uri_ids
189-
return redirect_uris and redirect_uris[0].name or ''
189+
return redirect_uris[:1].name
190190

191191
def validate_bearer_token(self, token, scopes, request):
192192
""" Ensure the supplied bearer token is valid, and allowed for the scopes

0 commit comments

Comments
 (0)