add_new_realm: Fix strict_optional errors.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2020-07-04 15:35:06 -07:00 committed by Tim Abbott
parent 3885fdadce
commit 6c9c12ee2d
2 changed files with 1 additions and 5 deletions

View File

@ -38,11 +38,6 @@ warn_unreachable = True
strict_optional = True
# One change required?
[mypy-zilencer.management.commands.add_new_realm] #22: error: List item 0 has incompatible type "Optional[Stream]"; expected "Stream"
strict_optional = False
# Re-architecting required?
[mypy-zerver.lib.queue] # Delayed setup of SimpleQueueClient.channel (Optional)

View File

@ -18,6 +18,7 @@ class Command(ZulipBaseCommand):
UserProfile.objects.filter(email__contains='user@').count())
user = do_create_user(f'{name}@{string_id}.zulip.com',
'password', realm, name, name, role=UserProfile.ROLE_REALM_ADMINISTRATOR)
assert realm.signup_notifications_stream is not None
bulk_add_subscriptions([realm.signup_notifications_stream], [user])
send_initial_realm_messages(realm)