Significant-Gravitas/AutoGPT · error · ValueError
Organization is already deleted
Error message
Organization is already deleted
What it means
Error "Organization is already deleted" thrown in Significant-Gravitas/AutoGPT.
Source
Thrown at autogpt_platform/backend/backend/api/features/orgs/db.py:402
where={"organizationId": org_id},
data=profile_update,
)
return await get_org(org_id)
async def delete_org(org_id: str) -> None:
"""Soft-delete an organization. Cannot delete personal orgs.
Sets deletedAt instead of hard-deleting to preserve financial records.
"""
org = await prisma.organization.find_unique(where={"id": org_id})
if org is None:
raise NotFoundError(f"Organization {org_id} not found")
if org.isPersonal:
raise ValueError("Cannot delete a personal organization. Convert it first.")
if org.deletedAt is not None:
raise ValueError("Organization is already deleted")
await prisma.organization.update(
where={"id": org_id},
data={"deletedAt": datetime.now(timezone.utc)},
)
async def convert_personal_org(org_id: str, user_id: str) -> OrgResponse:
"""Convert a personal org to a team org.
Creates a new personal org for the user so they always have one.
Existing resources (agents, credits, store listings) stay in the
team org — that's the point of converting.
If new personal org creation fails, the conversion is rolled back.
"""
org = await prisma.organization.find_unique(where={"id": org_id})
if org is None:View on GitHub (pinned to 9c8bb5550f)
Solutions
- No action needed; the organization is already deleted.
- Refresh the organization list to see current state.
When it happens
Trigger: Thrown at autogpt_platform/backend/backend/api/features/orgs/db.py:402 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Significant-Gravitas/AutoGPT@9c8bb5550f (2026-08-14).
Data as JSON: /api/errors/8c98a0e85666c134.
Report an issue: GitHub.