chore: format

This commit is contained in:
Timothy Jaeryang Baek
2026-07-20 22:11:42 -04:00
parent 4a42543fc3
commit 49e57f4e7e
16 changed files with 44 additions and 60 deletions
+8 -4
View File
@@ -1593,12 +1593,14 @@ class ChatTable:
# Check if there are any tags to filter
if 'none' in tag_ids:
stmt = stmt.filter(text("""
stmt = stmt.filter(
text("""
NOT EXISTS (
SELECT 1
FROM json_each(Chat.meta, '$.tags') AS tag
)
"""))
""")
)
elif tag_ids:
stmt = stmt.filter(
and_(
@@ -1641,12 +1643,14 @@ class ChatTable:
).params(title_key=f'%{search_text}%', content_key=search_text.lower())
if 'none' in tag_ids:
stmt = stmt.filter(text("""
stmt = stmt.filter(
text("""
NOT EXISTS (
SELECT 1
FROM json_array_elements_text(Chat.meta->'tags') AS tag
)
"""))
""")
)
elif tag_ids:
stmt = stmt.filter(
and_(