feat: add BoardWebhook updates on agent deletion
This commit is contained in:
@@ -16,6 +16,7 @@ from app.db import crud
|
||||
from app.models.activity_events import ActivityEvent
|
||||
from app.models.agents import Agent
|
||||
from app.models.approvals import Approval
|
||||
from app.models.board_webhooks import BoardWebhook
|
||||
from app.models.gateways import Gateway
|
||||
from app.models.tasks import Task
|
||||
from app.schemas.gateways import GatewayTemplatesSyncResult
|
||||
@@ -340,6 +341,14 @@ class GatewayAdminLifecycleService(OpenClawDBService):
|
||||
agent_id=None,
|
||||
commit=False,
|
||||
)
|
||||
await crud.update_where(
|
||||
self.session,
|
||||
BoardWebhook,
|
||||
col(BoardWebhook.agent_id) == agent_id,
|
||||
agent_id=None,
|
||||
updated_at=now,
|
||||
commit=False,
|
||||
)
|
||||
|
||||
async def sync_templates(
|
||||
self,
|
||||
|
||||
Reference in New Issue
Block a user