mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	narrows: Validate negated field.
This commit is contained in:
		@@ -554,10 +554,15 @@ def narrow_parameter(json: str) -> OptionalNarrowListT:
 | 
			
		||||
            else:
 | 
			
		||||
                operand_validator = check_string
 | 
			
		||||
 | 
			
		||||
            validator = check_dict([
 | 
			
		||||
                ('operator', check_string),
 | 
			
		||||
                ('operand', operand_validator),
 | 
			
		||||
            ])
 | 
			
		||||
            validator = check_dict(
 | 
			
		||||
                required_keys=[
 | 
			
		||||
                    ('operator', check_string),
 | 
			
		||||
                    ('operand', operand_validator),
 | 
			
		||||
                ],
 | 
			
		||||
                optional_keys=[
 | 
			
		||||
                    ('negated', check_bool),
 | 
			
		||||
                ],
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            try:
 | 
			
		||||
                validator('elem', elem)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user