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.
This commit is contained in:
		
							parent
							
								
									5b32b32914
								
							
						
					
					
						commit
						dda9e0a638
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		|  | @ -169,6 +169,7 @@ bots_config = {}  # type: Dict[str, Dict[str, str]] | ||||||
| @app.route('/', methods=['POST']) | @app.route('/', methods=['POST']) | ||||||
| def handle_bot() -> str: | def handle_bot() -> str: | ||||||
|     event = request.get_json(force=True) |     event = request.get_json(force=True) | ||||||
|  |     assert event is not None | ||||||
|     for bot_name, config in bots_config.items(): |     for bot_name, config in bots_config.items(): | ||||||
|         if config['email'] == event['bot_email']: |         if config['email'] == event['bot_email']: | ||||||
|             bot = bot_name |             bot = bot_name | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 LoopThrough-i-j
						LoopThrough-i-j