mirror of https://github.com/zulip/zulip.git
models.py: Disable unique_open_realm feature when realms have subdomains.
This commit is contained in:
parent
35481014a4
commit
6e517b2dec
|
@ -108,8 +108,10 @@ def completely_open(domain):
|
||||||
|
|
||||||
def get_unique_open_realm():
|
def get_unique_open_realm():
|
||||||
# type: () -> Optional[Realm]
|
# type: () -> Optional[Realm]
|
||||||
"""We only return a realm if there is a unique non-system-only realm
|
"""We only return a realm if there is a unique non-system-only realm,
|
||||||
and it is completely open."""
|
it is completely open, and there are no subdomains."""
|
||||||
|
if settings.REALMS_HAVE_SUBDOMAINS:
|
||||||
|
return None
|
||||||
realms = Realm.objects.filter(deactivated=False)
|
realms = Realm.objects.filter(deactivated=False)
|
||||||
# On production installations, the (usually "zulip.com") system
|
# On production installations, the (usually "zulip.com") system
|
||||||
# realm is an empty realm just used for system bots, so don't
|
# realm is an empty realm just used for system bots, so don't
|
||||||
|
|
Loading…
Reference in New Issue