From e7c17da82bee3b1b39d92c07d462a85e7cb45927 Mon Sep 17 00:00:00 2001 From: Codebuddy Date: Mon, 17 Aug 2026 11:27:48 +0800 Subject: [PATCH] =?utf8?q?fix:=20=E5=B7=B2=E4=B8=8A=E4=BC=A0=E6=96=87?= =?utf8?q?=E4=BB=B6=E6=8C=89=20task=5Fid=20=E6=AD=A3=E7=A1=AE=E8=A7=A3?= =?utf8?q?=E6=9E=90=E6=89=80=E5=B1=9E=E4=BC=9A=E8=AF=9D=E4=BB=BB=E5=8A=A1?= =?utf8?q?=E5=90=8D=EF=BC=88load=5Ftasks=20=E5=AE=9E=E4=B8=BA=20{tasks:[..?= =?utf8?q?.]}=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- backend/app.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/app.py b/backend/app.py index 1d88ed9..261bb18 100644 --- a/backend/app.py +++ b/backend/app.py @@ -813,7 +813,8 @@ async def list_uploads(request: Request): if not _auth_ok(request): return JSONResponse({"error": "unauthorized"}, status_code=401) try: - tasks = load_tasks() + tasks = load_tasks().get("tasks", []) + task_map = {t.get("id"): t.get("name", "") for t in tasks} idx = load_uploads_index() files = [] if PASTES_DIR.exists(): @@ -829,8 +830,8 @@ async def list_uploads(request: Request): kind = "zip" tid = idx.get(p.name, "") tname = "" - if tid and tid in tasks: - tname = tasks[tid].get("name", "") or "" + if tid and tid in task_map: + tname = task_map.get(tid, "") or "" st = p.stat() files.append({ "name": p.name, "path": str(p), -- 2.43.0