Skip to content

Commit

Permalink
botserver: Fix mypy error.
Browse files Browse the repository at this point in the history
Value of type "Optional[Any]" is not indexable error
was originated in PR zulip#682.
  • Loading branch information
LoopThrough-i-j committed May 12, 2021
1 parent 5b32b32 commit f15c3eb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions zulip_botserver/zulip_botserver/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ def init_message_handlers(
@app.route('/', methods=['POST'])
def handle_bot() -> str:
event = request.get_json(force=True)
assert event is not None
for bot_name, config in bots_config.items():
if config['email'] == event['bot_email']:
bot = bot_name
Expand Down

0 comments on commit f15c3eb

Please sign in to comment.