From 5a1019d8589ef7ae72bf2039ef6ec3de29bfb573 Mon Sep 17 00:00:00 2001 From: maryhipp Date: Tue, 3 Oct 2023 12:08:00 -0400 Subject: [PATCH] sort by starred and then created_at to get board cover image --- invokeai/app/services/image_record_storage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invokeai/app/services/image_record_storage.py b/invokeai/app/services/image_record_storage.py index f743fd1fe2..21afcaf0bf 100644 --- a/invokeai/app/services/image_record_storage.py +++ b/invokeai/app/services/image_record_storage.py @@ -584,7 +584,7 @@ class SqliteImageRecordStorage(ImageRecordStorageBase): FROM images JOIN board_images ON images.image_name = board_images.image_name WHERE board_images.board_id = ? - ORDER BY images.created_at DESC + ORDER BY images.starred DESC, images.created_at DESC LIMIT 1; """, (board_id,),