Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
logging_util: Save an assertion with __getitem__.
Zixuan James Li417e1b5e81e5
diff --git a/zerver/lib/logging_util.py b/zerver/lib/logging_util.pyindex f9769cf312b..09c3593236f 100644--- a/zerver/lib/logging_util.py+++ b/zerver/lib/logging_util.py@@ -255,11 +255,10 @@ class ZulipWebhookFormatter(ZulipFormatter):return super().format(record)if request.content_type == "application/json":- payload: Union[str, bytes, None] = request.body+ payload: Union[str, bytes] = request.bodyelse:- payload = request.POST.get("payload")+ payload = request.POST["payload"]- assert payload is not Nonetry:payload = orjson.dumps(orjson.loads(payload), option=orjson.OPT_INDENT_2).decode()except orjson.JSONDecodeError: