Skip to content

Commit

Permalink
fix: Use TEXT type for Webhook URLs to support large URLs (#24763)
Browse files Browse the repository at this point in the history
(cherry picked from commit 063e309)

Co-authored-by: Ankush Menat <ankush@frappe.io>
  • Loading branch information
mergify[bot] and ankush committed Feb 5, 2024
1 parent 6c5ea2f commit f31a3ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions frappe/integrations/doctype/webhook/webhook.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
},
{
"fieldname": "request_url",
"fieldtype": "Data",
"fieldtype": "Small Text",
"in_list_view": 1,
"label": "Request URL",
"reqd": 1
Expand Down Expand Up @@ -221,7 +221,7 @@
"link_fieldname": "webhook"
}
],
"modified": "2023-06-16 10:21:00.971833",
"modified": "2024-02-05 17:49:50.203001",
"modified_by": "Administrator",
"module": "Integrations",
"name": "Webhook",
Expand Down
3 changes: 2 additions & 1 deletion frappe/integrations/doctype/webhook/webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Webhook(Document):
preview_request_body: DF.Code | None
request_method: DF.Literal["POST", "PUT", "DELETE"]
request_structure: DF.Literal["", "Form URL-Encoded", "JSON"]
request_url: DF.Data
request_url: DF.SmallText
timeout: DF.Int
webhook_data: DF.Table[WebhookData]
webhook_docevent: DF.Literal[
Expand All @@ -56,6 +56,7 @@ class Webhook(Document):
webhook_json: DF.Code | None
webhook_secret: DF.Password | None
# end: auto-generated types

def validate(self):
self.validate_docevent()
self.validate_condition()
Expand Down

0 comments on commit f31a3ce

Please sign in to comment.