Fix implementation of default server name

This commit is contained in:
William Krinsman
2019-12-12 00:51:06 +00:00
parent 61a844b413
commit 794be0de8e
2 changed files with 23 additions and 12 deletions

View File

@@ -389,14 +389,9 @@ class User:
Full name.domain/path if using subdomains, otherwise just my /base/url
"""
if self.settings.get('subdomain_host'):
url = '{host}{path}'.format(host=self.host, path=self.base_url)
return '{host}{path}'.format(host=self.host, path=self.base_url)
else:
url = self.base_url
if self.settings.get('default_server_name'):
return url_path_join(url, self.settings.get('default_server_name'))
else:
return url
return self.base_url
def server_url(self, server_name=''):
"""Get the url for a server with a given name"""