mirror of
				https://github.com/zulip/zulip.git
				synced 2025-10-31 12:03:46 +00:00 
			
		
		
		
	middleware: Assert request.method is not None.
`request.method` is not `None` in normal use cases, unless an `HttpRequest` is directly instantiated without the method being set. This situation does not apply to `WSGIRequest` at all. Signed-off-by: Zixuan James Li <p359101898@gmail.com>
This commit is contained in:
		
				
					committed by
					
						 Tim Abbott
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							ece3fbdf95
						
					
				
				
					commit
					2095258aa5
				
			| @@ -434,6 +434,7 @@ class LogRequests(MiddlewareMixin): | ||||
|             content_iter = None | ||||
|  | ||||
|         assert request_notes.client_name is not None and request_notes.log_data is not None | ||||
|         assert request.method is not None | ||||
|         write_log_line( | ||||
|             request_notes.log_data, | ||||
|             request.path, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user