Skip to content

Commit 09ebe93

Browse files
botserver: Fix mypy error.
Value of type "Optional[Any]" is not indexable error was originated in PR #682. This is due to request in Flask 2.0.
1 parent 5b32b32 commit 09ebe93

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

zulip_botserver/zulip_botserver/server.py

+1
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ def init_message_handlers(
169169
@app.route('/', methods=['POST'])
170170
def handle_bot() -> str:
171171
event = request.get_json(force=True)
172+
assert event is not None
172173
for bot_name, config in bots_config.items():
173174
if config['email'] == event['bot_email']:
174175
bot = bot_name

0 commit comments

Comments
 (0)