Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
models: Fix return type of get_realm_domains.
Sahil Batraee11a68f7a10
diff --git a/zerver/management/commands/realm_domain.py b/zerver/management/commands/realm_domain.pyindex e913eafdfec..f77c6ea03f8 100644--- a/zerver/management/commands/realm_domain.py+++ b/zerver/management/commands/realm_domain.py@@ -30,6 +30,7 @@ class Command(ZulipBaseCommand):if options["op"] == "show":print(f"Domains for {realm.string_id}:")for realm_domain in get_realm_domains(realm):+ assert isinstance(realm_domain["domain"], str)if realm_domain["allow_subdomains"]:print(realm_domain["domain"] + " (subdomains allowed)")else:diff --git a/zerver/models.py b/zerver/models.pyindex 6eb709975a8..7291e486c0f 100644--- a/zerver/models.py+++ b/zerver/models.py@@ -1049,7 +1049,7 @@ class EmailContainsPlusError(Exception):pass-def get_realm_domains(realm: Realm) -> List[Dict[str, str]]:+def get_realm_domains(realm: Realm) -> List[Dict[str, Union[str, bool]]]:return list(realm.realmdomain_set.values("domain", "allow_subdomains"))