oauth: use client_id for description if empty

that way description can never be empty on retrieval
This commit is contained in:
Min RK
2021-05-20 09:45:22 +02:00
parent e2076e6c91
commit 72b1dd2204

View File

@@ -611,7 +611,7 @@ class JupyterHubOAuthServer(WebApplicationServer):
allowed_roles = [] allowed_roles = []
orm_client.secret = hash_token(client_secret) if client_secret else "" orm_client.secret = hash_token(client_secret) if client_secret else ""
orm_client.redirect_uri = redirect_uri orm_client.redirect_uri = redirect_uri
orm_client.description = description orm_client.description = description or client_id
orm_client.allowed_roles = allowed_roles orm_client.allowed_roles = allowed_roles
self.db.commit() self.db.commit()