mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-16 06:22:59 +00:00
User has no single .server anymore
This commit is contained in:
@@ -149,12 +149,13 @@ class User(Base):
|
|||||||
groups = relationship('Group', secondary='user_group_map', back_populates='users')
|
groups = relationship('Group', secondary='user_group_map', back_populates='users')
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
if self.server:
|
if self.servers:
|
||||||
|
server = self.servers[0]
|
||||||
return "<{cls}({name}@{ip}:{port})>".format(
|
return "<{cls}({name}@{ip}:{port})>".format(
|
||||||
cls=self.__class__.__name__,
|
cls=self.__class__.__name__,
|
||||||
name=self.name,
|
name=self.name,
|
||||||
ip=self.server.ip,
|
ip=server.ip,
|
||||||
port=self.server.port,
|
port=server.port,
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
return "<{cls}({name} [unconfigured])>".format(
|
return "<{cls}({name} [unconfigured])>".format(
|
||||||
|
Reference in New Issue
Block a user