Skip to content

A platform for community discussion. Free, open, simple.

FIX: Allow setting blank secret on an existing webhook (#33096)

Ted Johansson829b1bd6fd6b
diff --git a/app/assets/javascripts/admin/addon/components/admin-config-areas/webhooks-form.gjs b/app/assets/javascripts/admin/addon/components/admin-config-areas/webhooks-form.gjs
index 1e3e99cdad5..83156fe3340 100644
--- a/app/assets/javascripts/admin/addon/components/admin-config-areas/webhooks-form.gjs
+++ b/app/assets/javascripts/admin/addon/components/admin-config-areas/webhooks-form.gjs
@@ -42,7 +42,7 @@ export default class AdminConfigAreasWebhookForm extends Component {
return {
payload_url: this.webhook.payload_url,
content_type: this.webhook.content_type,
- secret: this.webhook.secret === "" ? null : this.webhook.secret,
+ secret: this.webhook.secret,
categories: this.webhook.categories,
group_names: this.webhook.group_names,
tag_names: this.webhook.tag_names,
diff --git a/app/assets/javascripts/admin/addon/models/web-hook.js b/app/assets/javascripts/admin/addon/models/web-hook.js
index 8139a9918fc..d50510ad4ec 100644
--- a/app/assets/javascripts/admin/addon/models/web-hook.js
+++ b/app/assets/javascripts/admin/addon/models/web-hook.js
@@ -113,7 +113,7 @@ export default class WebHook extends RestModel {
return {
payload_url: this.payload_url,
content_type: this.content_type,
- secret: this.secret,
+ secret: this.secret ?? "",
wildcard_web_hook: this.wildcard_web_hook,
verify_certificate: this.verify_certificate,
active: this.active,