Allow failed runs to always be deleted
Failed runs have no output to protect, so they can be deleted without checking L2 shared status or activity records. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -406,6 +406,8 @@ async def discard_run(run_id: str, username: str = Depends(get_required_user)):
|
|||||||
if run.username not in (username, actor_id):
|
if run.username not in (username, actor_id):
|
||||||
raise HTTPException(403, "Access denied")
|
raise HTTPException(403, "Access denied")
|
||||||
|
|
||||||
|
# Failed runs can always be deleted (no output to protect)
|
||||||
|
if run.status != "failed":
|
||||||
# Check if activity exists for this run
|
# Check if activity exists for this run
|
||||||
activity = cache_manager.get_activity(run_id)
|
activity = cache_manager.get_activity(run_id)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user