Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

gitlab: Description can be none.

Alex Vandiver5a44a6624b25
diff --git a/zerver/webhooks/gitlab/view.py b/zerver/webhooks/gitlab/view.py
index 3988411dbe7..351525c8f87 100644
--- a/zerver/webhooks/gitlab/view.py
+++ b/zerver/webhooks/gitlab/view.py
@@ -9,7 +9,7 @@ from zerver.decorator import webhook_view
from zerver.lib.exceptions import UnsupportedWebhookEventTypeError
from zerver.lib.response import json_success
from zerver.lib.typed_endpoint import JsonBodyPayload, typed_endpoint
-from zerver.lib.validator import WildValue, check_int, check_string
+from zerver.lib.validator import WildValue, check_int, check_none_or, check_string
from zerver.lib.webhooks.common import (
OptionalUserSpecifiedTopicStr,
check_send_webhook_message,
@@ -169,7 +169,7 @@ def get_merge_request_open_or_updated_body(
base_branch=pull_request["target_branch"].tame(check_string)
if action == "created"
else None,
- message=pull_request["description"].tame(check_string),
+ message=pull_request["description"].tame(check_none_or(check_string)),
assignees=replace_assignees_username_with_name(get_assignees(payload)),
type="MR",
title=payload["object_attributes"]["title"].tame(check_string) if include_title else None,