From eb49b185974264a676936d1841424e8b675a3dbb Mon Sep 17 00:00:00 2001 From: ymq Date: Tue, 15 Sep 2026 16:46:45 +0800 Subject: [PATCH] =?UTF-8?q?fix(todos):=20=E5=BE=85=E5=8A=9E=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E9=A1=B9=E7=9B=AE=E5=88=97=E6=98=BE=E7=A4=BA=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E2=80=94=E2=80=94=E5=AD=A4=E5=84=BF=E5=BE=85=E5=8A=9E?= =?UTF-8?q?(=E9=A1=B9=E7=9B=AE=E5=B7=B2=E5=88=A0)=E5=85=9C=E5=BA=95?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E3=80=8C=EF=BC=88=E9=A1=B9=E7=9B=AE=E5=B7=B2?= =?UTF-8?q?=E5=88=A0=E9=99=A4=EF=BC=89=E3=80=8D=E4=B8=8D=E5=86=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E8=A3=B8=E9=A1=B9=E7=9B=AE=E7=BC=96=E5=8F=B7(2026-09-?= =?UTF-8?q?15=E7=94=A8=E6=88=B7=E6=8C=87=E4=BB=A4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wwwroot/api/my_todos.dspy | 4 ++-- wwwroot/api/my_todos_popup.dspy | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wwwroot/api/my_todos.dspy b/wwwroot/api/my_todos.dspy index af29a04..8165e47 100644 --- a/wwwroot/api/my_todos.dspy +++ b/wwwroot/api/my_todos.dspy @@ -21,8 +21,8 @@ for t in todos: proj_names[pid] = getattr(_pr[0], 'name', '') or pid except Exception: pass - t['project_name'] = proj_names.get(pid, pid) + t['project_name'] = proj_names.get(pid) or ('(项目已删除)' if pid else '') else: - t['project_name'] = proj_names.get(pid, pid) + t['project_name'] = proj_names.get(pid) or ('(项目已删除)' if pid else '') return json.dumps({"success": True, "todos": todos}, ensure_ascii=False, default=str) diff --git a/wwwroot/api/my_todos_popup.dspy b/wwwroot/api/my_todos_popup.dspy index b250127..323d79e 100644 --- a/wwwroot/api/my_todos_popup.dspy +++ b/wwwroot/api/my_todos_popup.dspy @@ -91,7 +91,7 @@ for t in (todos or []): pid = _s(t.get('project_id')) meta_bits = [] - pname = proj_names.get(pid) or _s(t.get('project_name')) or pid + pname = proj_names.get(pid) or _s(t.get('project_name')) or ('(项目已删除)' if pid else '') if pname: meta_bits.append('项目:' + pname) if t.get('created_at'):