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