Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
webhooks: Fix a type: ignore issue.
Anders Kaseorgbc9663d57f7f
diff --git a/zerver/lib/webhooks/common.py b/zerver/lib/webhooks/common.pyindex aad19a9ff08..9e67cfa0e7b 100644--- a/zerver/lib/webhooks/common.py+++ b/zerver/lib/webhooks/common.py@@ -145,7 +145,7 @@ def get_fixture_http_headers(integration_name: str,# TODO: We may want to migrate to a more explicit registration# strategy for this behavior rather than a try/except import.view_module = importlib.import_module(view_module_name)- fixture_to_headers = view_module.fixture_to_headers # type: ignore[attr-defined] # we do extra exception handling in case it does not exist below.+ fixture_to_headers = getattr(view_module, "fixture_to_headers")except (ImportError, AttributeError):return {}return fixture_to_headers(fixture_name)