From f9961eceb787fa69336ff4a2156bd7e4d58a1cb8 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 29 Jun 2024 11:07:39 +1000 Subject: [PATCH] fix(app): fix SQL query w/ enum for python 3.11 --- invokeai/app/services/image_records/image_records_sqlite.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/invokeai/app/services/image_records/image_records_sqlite.py b/invokeai/app/services/image_records/image_records_sqlite.py index e6196bf5fc..2aab844f46 100644 --- a/invokeai/app/services/image_records/image_records_sqlite.py +++ b/invokeai/app/services/image_records/image_records_sqlite.py @@ -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