From e0a12272ed9e479a4bee11b2e28eb683209946ba Mon Sep 17 00:00:00 2001 From: Derick Phan Date: Thu, 26 Mar 2026 07:44:26 -0700 Subject: [PATCH] Fix about page showing stale tag count after tag removal Count tags from page_tags instead of the tags table, which retains orphaned rows when tags are removed from pages. Co-Authored-By: Claude Opus 4.6 --- handlers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handlers.py b/handlers.py index 2c0ec07..6e67f47 100644 --- a/handlers.py +++ b/handlers.py @@ -419,7 +419,7 @@ def handle_about(): sharing = get_setting("sharing_enabled", "0") == "1" db = get_db() page_count = db.execute("SELECT count(*) FROM pages").fetchone()[0] - tag_count = db.execute("SELECT count(*) FROM tags").fetchone()[0] + tag_count = db.execute("SELECT count(DISTINCT tag_id) FROM page_tags").fetchone()[0] sub_count = db.execute("SELECT count(*) FROM subscriptions").fetchone()[0] db.close()