Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/agents-api/agents_api/queries/agents/delete_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@

# Define the raw SQL query
agent_query = """
WITH deleted_file_owners AS (
WITH deleted_session_lookup AS (
DELETE FROM session_lookup
WHERE developer_id = $1
AND participant_type = 'agent'
AND participant_id = $2
),
deleted_file_owners AS (
DELETE FROM file_owners
WHERE developer_id = $1
AND owner_type = 'agent'
Expand Down