fix: filter deleted tasks/list items from focus, redirect task delete to list

Focus query now excludes soft-deleted tasks and list items.
Task delete redirects to /tasks instead of back to the (now deleted)
task's edit page.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-03 16:08:35 +00:00
parent b5c8f305dd
commit 1bb92ea87d
2 changed files with 3 additions and 2 deletions

View File

@@ -59,6 +59,8 @@ async def focus_view(
LEFT JOIN domains ld ON l.domain_id = ld.id
LEFT JOIN areas la ON l.area_id = la.id
WHERE df.focus_date = :target_date AND df.is_deleted = false
AND (t.id IS NULL OR t.is_deleted = false)
AND (li.id IS NULL OR li.is_deleted = false)
ORDER BY df.sort_order, df.created_at
"""), {"target_date": target_date})
items = [dict(r._mapping) for r in result]