mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	webhooks: Use setattr when assigning _all_event_types.
Signed-off-by: Zixuan James Li <p359101898@gmail.com>
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							6cd4d907ba
						
					
				
				
					commit
					a86ba33087
				
			@@ -369,7 +369,9 @@ def webhook_view(
 | 
			
		||||
                    log_exception_to_webhook_logger(err)
 | 
			
		||||
                raise err
 | 
			
		||||
 | 
			
		||||
        _wrapped_func_arguments._all_event_types = all_event_types
 | 
			
		||||
        # Store the event types registered for this webhook as an attribute, which can be access
 | 
			
		||||
        # later conveniently in zerver.lib.test_classes.WebhookTestCase.
 | 
			
		||||
        setattr(_wrapped_func_arguments, "_all_event_types", all_event_types)
 | 
			
		||||
        return _wrapped_func_arguments
 | 
			
		||||
 | 
			
		||||
    return _wrapped_view_func
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user