use only the first 10 chars of server_url

This commit is contained in:
Christian Barra
2017-01-19 01:55:40 +01:00
parent 3524399984
commit d682edd44f

View File

@@ -206,7 +206,7 @@ class User(HasTraits):
Because there could be more then one server per user Because there could be more then one server per user
each server has to have a unique reference (UUID4) each server has to have a unique reference (UUID4)
base_url is built using user's base url and adding /servers/{name} base_url is built using user's base url and adding /server/{name}
where name is the server uuid urlsafed where name is the server uuid urlsafed
""" """
db = self.db db = self.db
@@ -215,7 +215,7 @@ class User(HasTraits):
server = orm.Server( server = orm.Server(
name = server_uuid.hex, name = server_uuid.hex,
cookie_name=self.cookie_name, cookie_name=self.cookie_name,
base_url=url_path_join(self.base_url, 'server', server_url), base_url=url_path_join(self.base_url, 'server', server_url[:10]),
) )
self.servers.append(server) self.servers.append(server)
db.add(self) db.add(self)