From ea78b41a3603a4dceb717cc2a6962cc1d6719951 Mon Sep 17 00:00:00 2001 From: Hugh Brown Date: Tue, 3 Mar 2026 21:23:18 -0700 Subject: [PATCH] fix: persist webhook secret on create and normalize on update The secret field was accepted in BoardWebhookCreate but never passed to the BoardWebhook constructor, silently dropping it. Now secret is persisted at creation time (with empty/whitespace normalized to None) and similarly normalized on PATCH so sending "" clears a set secret. Co-Authored-By: Claude Opus 4.6 --- backend/app/api/board_webhooks.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/app/api/board_webhooks.py b/backend/app/api/board_webhooks.py index 1a7c6ba6..2312462c 100644 --- a/backend/app/api/board_webhooks.py +++ b/backend/app/api/board_webhooks.py @@ -350,6 +350,7 @@ async def create_board_webhook( agent_id=payload.agent_id, description=payload.description, enabled=payload.enabled, + secret=payload.secret or None, ) await crud.save(session, webhook) return _to_webhook_read(webhook) @@ -384,6 +385,8 @@ async def update_board_webhook( webhook_id=webhook_id, ) updates = payload.model_dump(exclude_unset=True) + if "secret" in updates: + updates["secret"] = updates["secret"] or None if updates: await _validate_agent_id( session=session,