feat: add BoardWebhook updates on agent deletion
This commit is contained in:
@@ -31,6 +31,7 @@ from app.models.activity_events import ActivityEvent
|
||||
from app.models.agents import Agent
|
||||
from app.models.approvals import Approval
|
||||
from app.models.board_memory import BoardMemory
|
||||
from app.models.board_webhooks import BoardWebhook
|
||||
from app.models.boards import Board
|
||||
from app.models.gateways import Gateway
|
||||
from app.models.organizations import Organization
|
||||
@@ -1849,6 +1850,14 @@ class AgentLifecycleService(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,
|
||||
)
|
||||
await self.session.delete(agent)
|
||||
await self.session.commit()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user