get_events_backend: Validate narrow type correctly.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2020-06-20 18:21:18 -07:00 committed by Tim Abbott
parent f1707cfec6
commit 6e33b9c6f2
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@ def get_events_backend(request: HttpRequest, user_profile: UserProfile,
event_types: Optional[Sequence[str]]=REQ(default=None, validator=check_list(check_string), event_types: Optional[Sequence[str]]=REQ(default=None, validator=check_list(check_string),
intentionally_undocumented=True), intentionally_undocumented=True),
dont_block: bool=REQ(default=False, validator=check_bool), dont_block: bool=REQ(default=False, validator=check_bool),
narrow: Iterable[Sequence[str]]=REQ(default=[], validator=check_list(None), narrow: Iterable[Sequence[str]]=REQ(default=[], validator=check_list(check_list(check_string)),
intentionally_undocumented=True), intentionally_undocumented=True),
lifespan_secs: int=REQ(default=0, converter=to_non_negative_int, lifespan_secs: int=REQ(default=0, converter=to_non_negative_int,
intentionally_undocumented=True), intentionally_undocumented=True),