registration: Fix strict_optional errors.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2020-07-04 17:55:15 -07:00 committed by Tim Abbott
parent 8e6a439529
commit 2fb96e94f1
2 changed files with 1 additions and 4 deletions

View File

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

View File

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