Tried to fix a broke filter.
Build LinkLog Development Image / development-image (push) Successful in 10s

This commit is contained in:
2026-08-27 22:54:22 +02:00
parent 9494d2b119
commit 7bd64b870c
8 changed files with 56 additions and 42 deletions
+2 -25
View File
@@ -227,32 +227,9 @@ def list_public_users():
return [row['username'] for row in rows]
def list_tags(user_id: str | None = None):
def list_tags():
with get_connection() as conn:
if user_id:
rows = conn.execute(
'''
SELECT tags.name
FROM tags
LEFT JOIN users ON users.id = tags.created_by
WHERE tags.created_by IS NULL
OR tags.created_by = ?
OR users.is_admin = 1
ORDER BY tags.name
''',
(user_id,),
).fetchall()
else:
rows = conn.execute(
'''
SELECT tags.name
FROM tags
LEFT JOIN users ON users.id = tags.created_by
WHERE tags.created_by IS NULL
OR users.is_admin = 1
ORDER BY tags.name
''',
).fetchall()
rows = conn.execute('SELECT name FROM tags ORDER BY name').fetchall()
tags = []
seen = set()
for row in rows: