mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-15 05:53:00 +00:00
assign hub in token app
avoids AttributeError on hub if there are users with running servers. Don't call init_hub, which can modify the Hub's entries in the database, which shouldn't happen in the token command.
This commit is contained in:
@@ -126,6 +126,7 @@ class NewToken(Application):
|
||||
hub = JupyterHub(parent=self)
|
||||
hub.load_config_file(hub.config_file)
|
||||
hub.init_db()
|
||||
hub.hub = hub.db.query(orm.Hub).first()
|
||||
hub.init_users()
|
||||
user = orm.User.find(hub.db, self.name)
|
||||
if user is None:
|
||||
|
Reference in New Issue
Block a user