fix: workspace delete MissingGreenlet + nginx cache-busting
- Convert WorkspaceHasInstancesError to store plain dicts instead of SQLAlchemy ORM objects, preventing lazy-load failures outside async session context (MissingGreenlet) - Update both delete endpoints (top-level and nested) to use exc.instances directly since they're already plain dicts - Add no-cache headers for index.html in nginx.conf so browsers always fetch new hashed JS/CSS bundles on deploy
This commit is contained in:
@@ -91,7 +91,7 @@ async def delete_workspace_top_level(
|
||||
status_code=409,
|
||||
detail={
|
||||
"message": "Workspace has running tool instances",
|
||||
"instances": [{"id": str(i.id), "name": i.name} for i in exc.instances],
|
||||
"instances": exc.instances,
|
||||
},
|
||||
) from exc
|
||||
except Exception as exc:
|
||||
@@ -358,7 +358,7 @@ async def delete_workspace(
|
||||
status_code=409,
|
||||
detail={
|
||||
"message": "Workspace has running tool instances",
|
||||
"instances": [{"id": str(i.id), "name": i.name} for i in exc.instances],
|
||||
"instances": exc.instances,
|
||||
},
|
||||
) from exc
|
||||
except Exception as exc:
|
||||
|
||||
Reference in New Issue
Block a user