From 89dcf49186b09a1623a5992aab189ebf4e026aec Mon Sep 17 00:00:00 2001 From: meijiali <你的邮箱@xxx.com> Date: Mon, 6 Jul 2026 14:47:26 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=B2=BE=E7=AE=80=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E8=A7=84=E6=A8=A1=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/task_service.py | 5 +---- tests/integration/test_routes.py | 6 ++++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/app/services/task_service.py b/app/services/task_service.py index b7c0a1c..ad12a18 100644 --- a/app/services/task_service.py +++ b/app/services/task_service.py @@ -183,10 +183,7 @@ def hydrate_task_progress(session: Session, task: Task) -> Task: task.display_number = display_number task.display_id = str(display_number) task.created_at_label = format_datetime_minute(task.created_at) - task.scale_label = ( - f"{PLATFORM_LABELS.get(task.platform, task.platform)} · " - f"{task.hotspot_limit}热点 × {task.item_limit_per_hotspot}内容 × {task.comment_limit_per_item}评论" - ) + task.scale_label = f"{task.hotspot_limit}热点 × {task.item_limit_per_hotspot}内容 × {task.comment_limit_per_item}评论" task.error_summary = build_task_error_summary(task) task.hotspots_count = session.scalar(select(func.count(Hotspot.id)).where(Hotspot.task_id == task.id)) or 0 task.comments_count = session.scalar(select(func.count(Comment.id)).where(Comment.task_id == task.id)) or 0 diff --git a/tests/integration/test_routes.py b/tests/integration/test_routes.py index 91cea49..007a335 100644 --- a/tests/integration/test_routes.py +++ b/tests/integration/test_routes.py @@ -107,8 +107,10 @@ def test_index_page_uses_short_task_numbers_compact_fields_and_friendly_error_co assert second_id not in visible_text assert "2026-07-03 10:30" in visible_text assert "2026-07-03 10:35" in visible_text - assert "小红书 · 5热点 × 5内容 × 50评论" in visible_text - assert "抖音 · 1热点 × 1内容 × 10评论" in visible_text + assert "5热点 × 5内容 × 50评论" in visible_text + assert "1热点 × 1内容 × 10评论" in visible_text + assert "小红书 · 5热点" not in visible_text + assert "抖音 · 1热点" not in visible_text assert "系统重启,任务被中断" in visible_text assert "system / unexpected_restart" not in visible_text assert "unexpected_restart" not in visible_text