mirror of https://github.com/zulip/zulip.git
subdomains: Refactor Realm.uri as a trivial wrapper for Realm.host.
This commit is contained in:
parent
30cc2994de
commit
f676635653
|
@ -274,10 +274,7 @@ class Realm(ModelReprMixin, models.Model):
|
|||
@property
|
||||
def uri(self):
|
||||
# type: () -> str
|
||||
if self.subdomain not in [None, ""]:
|
||||
return '%s%s.%s' % (settings.EXTERNAL_URI_SCHEME,
|
||||
self.subdomain, settings.EXTERNAL_HOST)
|
||||
return settings.ROOT_DOMAIN_URI
|
||||
return settings.EXTERNAL_URI_SCHEME + self.host
|
||||
|
||||
@property
|
||||
def host(self):
|
||||
|
|
Loading…
Reference in New Issue