From c0a0e6fd7040527f7f50f366fdc32d05324ce444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20H=C3=B6nig?= Date: Tue, 30 Jan 2018 19:13:08 +0100 Subject: [PATCH] Set add_bot_backend() config_data param default to {}. Previously, the default was None. This caused 500s when adding a bot without adding a config_data argument. --- zerver/views/users.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zerver/views/users.py b/zerver/views/users.py index 31712a87a1..58f7875113 100644 --- a/zerver/views/users.py +++ b/zerver/views/users.py @@ -255,8 +255,8 @@ def add_bot_backend( bot_type: int=REQ(validator=check_int, default=UserProfile.DEFAULT_BOT), payload_url: Optional[Text]=REQ(validator=check_url, default=""), service_name: Optional[Text]=REQ(default=None), - config_data: Optional[Dict[Text, Text]]=REQ(default=None, - validator=check_dict(value_validator=check_string)), + config_data: Dict[Text, Text]=REQ(default={}, + validator=check_dict(value_validator=check_string)), interface_type: int=REQ(validator=check_int, default=Service.GENERIC), default_sending_stream_name: Optional[Text]=REQ('default_sending_stream', default=None), default_events_register_stream_name: Optional[Text]=REQ('default_events_register_stream',