issue-3772: populating user_options from orm_spawner

This commit is contained in:
Igor Berman
2022-01-20 18:01:57 +02:00
parent 67ebe0b0cf
commit 64d6f0222c
2 changed files with 3 additions and 2 deletions

View File

@@ -201,7 +201,7 @@ class APIHandler(BaseHandler):
'pending': spawner.pending, 'pending': spawner.pending,
'ready': spawner.ready, 'ready': spawner.ready,
'url': url_path_join(spawner.user.url, spawner.name, '/'), 'url': url_path_join(spawner.user.url, spawner.name, '/'),
'user_options': spawner.orm_spawner.user_options, 'user_options': spawner.user_options,
'progress_url': spawner._progress_url, 'progress_url': spawner._progress_url,
} }
scope_filter = self.get_scope_filter('admin:server_state') scope_filter = self.get_scope_filter('admin:server_state')

View File

@@ -376,6 +376,7 @@ class User:
oauth_client_id=client_id, oauth_client_id=client_id,
cookie_options=self.settings.get('cookie_options', {}), cookie_options=self.settings.get('cookie_options', {}),
trusted_alt_names=trusted_alt_names, trusted_alt_names=trusted_alt_names,
user_options=orm_spawner.user_options or {},
) )
if self.settings.get('internal_ssl'): if self.settings.get('internal_ssl'):
@@ -600,7 +601,7 @@ class User:
spawner.handler = handler spawner.handler = handler
# Passing user_options to the spawner # Passing user_options to the spawner
if options is None: if options is None or options is {}:
# options unspecified, load from db which should have the previous value # options unspecified, load from db which should have the previous value
options = spawner.orm_spawner.user_options or {} options = spawner.orm_spawner.user_options or {}
else: else: