subdomains: Hardcode can_add_realm_domains=True.

It was already always True if REALMS_HAVE_SUBDOMAINS, and now that's
the only supported configuration.
This commit is contained in:
Tim Abbott
2017-10-01 23:04:12 -07:00
parent 66658bbf25
commit 13bb546ddd
4 changed files with 6 additions and 22 deletions

View File

@@ -319,14 +319,6 @@ class RealmDomain(models.Model):
class Meta(object):
unique_together = ("realm", "domain")
def can_add_realm_domain(domain):
# type: (Text) -> bool
if settings.REALMS_HAVE_SUBDOMAINS:
return True
if RealmDomain.objects.filter(domain=domain).exists():
return False
return True
# These functions should only be used on email addresses that have
# been validated via django.core.validators.validate_email
#