diff --git a/invokeai/app/api/routers/boards.py b/invokeai/app/api/routers/boards.py index 0c599627e1..47dc8578a5 100644 --- a/invokeai/app/api/routers/boards.py +++ b/invokeai/app/api/routers/boards.py @@ -124,11 +124,7 @@ async def list_boards( if all: return ApiDependencies.invoker.services.boards.get_all(archived) elif offset is not None and limit is not None: - return ApiDependencies.invoker.services.boards.get_many( - offset, - limit, - archived - ) + return ApiDependencies.invoker.services.boards.get_many(offset, limit, archived) else: raise HTTPException( status_code=400, diff --git a/invokeai/app/services/board_records/board_records_base.py b/invokeai/app/services/board_records/board_records_base.py index 149cf9b724..eee21f4a7c 100644 --- a/invokeai/app/services/board_records/board_records_base.py +++ b/invokeai/app/services/board_records/board_records_base.py @@ -39,19 +39,11 @@ class BoardRecordStorageBase(ABC): pass @abstractmethod - def get_many( - self, - offset: int = 0, - limit: int = 10, - archived: bool = False - ) -> OffsetPaginatedResults[BoardRecord]: + def get_many(self, offset: int = 0, limit: int = 10, archived: bool = False) -> OffsetPaginatedResults[BoardRecord]: """Gets many board records.""" pass @abstractmethod - def get_all( - self, - archived: bool = False - ) -> list[BoardRecord]: + def get_all(self, archived: bool = False) -> list[BoardRecord]: """Gets all board records.""" pass diff --git a/invokeai/app/services/board_records/board_records_common.py b/invokeai/app/services/board_records/board_records_common.py index 40dbf13654..6c024c738c 100644 --- a/invokeai/app/services/board_records/board_records_common.py +++ b/invokeai/app/services/board_records/board_records_common.py @@ -46,7 +46,7 @@ def deserialize_board_record(board_dict: dict) -> BoardRecord: created_at=created_at, updated_at=updated_at, deleted_at=deleted_at, - archived=archived + archived=archived, ) diff --git a/invokeai/app/services/board_records/board_records_sqlite.py b/invokeai/app/services/board_records/board_records_sqlite.py index efdc215b2a..9b976a0e70 100644 --- a/invokeai/app/services/board_records/board_records_sqlite.py +++ b/invokeai/app/services/board_records/board_records_sqlite.py @@ -145,12 +145,7 @@ class SqliteBoardRecordStorage(BoardRecordStorageBase): self._lock.release() return self.get(board_id) - def get_many( - self, - offset: int = 0, - limit: int = 10, - archived: bool = False - ) -> OffsetPaginatedResults[BoardRecord]: + def get_many(self, offset: int = 0, limit: int = 10, archived: bool = False) -> OffsetPaginatedResults[BoardRecord]: try: self._lock.acquire() @@ -203,10 +198,7 @@ class SqliteBoardRecordStorage(BoardRecordStorageBase): finally: self._lock.release() - def get_all( - self, - archived: bool = False - ) -> list[BoardRecord]: + def get_all(self, archived: bool = False) -> list[BoardRecord]: try: self._lock.acquire() diff --git a/invokeai/app/services/boards/boards_base.py b/invokeai/app/services/boards/boards_base.py index bcf046484f..dbdaa6c5f9 100644 --- a/invokeai/app/services/boards/boards_base.py +++ b/invokeai/app/services/boards/boards_base.py @@ -43,19 +43,11 @@ class BoardServiceABC(ABC): pass @abstractmethod - def get_many( - self, - offset: int = 0, - limit: int = 10, - archived: bool = False - ) -> OffsetPaginatedResults[BoardDTO]: + def get_many(self, offset: int = 0, limit: int = 10, archived: bool = False) -> OffsetPaginatedResults[BoardDTO]: """Gets many boards.""" pass @abstractmethod - def get_all( - self, - archived: bool = False - ) -> list[BoardDTO]: + def get_all(self, archived: bool = False) -> list[BoardDTO]: """Gets all boards.""" pass