fix(app): fix SQL query w/ enum for python 3.11

This commit is contained in:
psychedelicious 2024-06-29 11:07:39 +10:00
parent 10076fb1e8
commit f9961eceb7

View File

@ -213,11 +213,11 @@ class SqliteImageRecordStorage(ImageRecordStorageBase):
if starred_first:
query_pagination = f"""--sql
ORDER BY images.starred DESC, images.created_at {order_dir} LIMIT ? OFFSET ?
ORDER BY images.starred DESC, images.created_at {order_dir.value} LIMIT ? OFFSET ?
"""
else:
query_pagination = f"""--sql
ORDER BY images.created_at {order_dir} LIMIT ? OFFSET ?
ORDER BY images.created_at {order_dir.value} LIMIT ? OFFSET ?
"""
# Final images query with pagination