diff --git a/mypy.ini b/mypy.ini index b2afb32246..99d361208f 100644 --- a/mypy.ini +++ b/mypy.ini @@ -40,9 +40,6 @@ strict_optional = True # General exclusions to work on -[mypy-zerver.views.registration] -strict_optional = False - [mypy-tools.lib.html_branches] strict_optional = False diff --git a/zerver/views/registration.py b/zerver/views/registration.py index b43db0c25b..56b366fca0 100644 --- a/zerver/views/registration.py +++ b/zerver/views/registration.py @@ -426,7 +426,7 @@ def accounts_register(request: HttpRequest) -> HttpResponse: 'require_ldap_password': require_ldap_password, 'password_auth_enabled': password_auth_enabled(realm), 'root_domain_available': is_root_domain_available(), - 'default_stream_groups': get_default_stream_groups(realm), + 'default_stream_groups': [] if realm is None else get_default_stream_groups(realm), 'accounts': get_accounts_for_email(email), 'MAX_REALM_NAME_LENGTH': str(Realm.MAX_REALM_NAME_LENGTH), 'MAX_NAME_LENGTH': str(UserProfile.MAX_NAME_LENGTH),