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 <noreply@anthropic.com>
This commit is contained in:
parent
20de39fc46
commit
e0a12272ed
1 changed files with 1 additions and 1 deletions
|
|
@ -419,7 +419,7 @@ def handle_about():
|
||||||
sharing = get_setting("sharing_enabled", "0") == "1"
|
sharing = get_setting("sharing_enabled", "0") == "1"
|
||||||
db = get_db()
|
db = get_db()
|
||||||
page_count = db.execute("SELECT count(*) FROM pages").fetchone()[0]
|
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]
|
sub_count = db.execute("SELECT count(*) FROM subscriptions").fetchone()[0]
|
||||||
db.close()
|
db.close()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue