subdomains: Refactor Realm.uri as a trivial wrapper for Realm.host.

This commit is contained in:
Greg Price 2017-10-19 19:40:20 -07:00 committed by Tim Abbott
parent 30cc2994de
commit f676635653
1 changed files with 1 additions and 4 deletions

View File

@ -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):