mirror of https://github.com/zulip/zulip.git
narrows: Validate negated field.
This commit is contained in:
parent
0039c858a4
commit
f960df04e8
|
@ -554,10 +554,15 @@ def narrow_parameter(json: str) -> OptionalNarrowListT:
|
|||
else:
|
||||
operand_validator = check_string
|
||||
|
||||
validator = check_dict([
|
||||
validator = check_dict(
|
||||
required_keys=[
|
||||
('operator', check_string),
|
||||
('operand', operand_validator),
|
||||
])
|
||||
],
|
||||
optional_keys=[
|
||||
('negated', check_bool),
|
||||
],
|
||||
)
|
||||
|
||||
try:
|
||||
validator('elem', elem)
|
||||
|
|
Loading…
Reference in New Issue