From a15a5bc3b8a6abfde208d80dc500814bb2f5d3e6 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Mon, 21 Aug 2023 19:51:02 +1000 Subject: [PATCH] fix(api): correct `get_batch` response model --- invokeai/app/api/routers/sessions.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/invokeai/app/api/routers/sessions.py b/invokeai/app/api/routers/sessions.py index a51bdbf9fd..d743ee70ac 100644 --- a/invokeai/app/api/routers/sessions.py +++ b/invokeai/app/api/routers/sessions.py @@ -6,7 +6,7 @@ from fastapi import Body, HTTPException, Path, Query, Response from fastapi.routing import APIRouter from pydantic.fields import Field -from invokeai.app.services.batch_manager_storage import BatchProcess, BatchSession, BatchSessionNotFoundException +from invokeai.app.services.batch_manager_storage import BatchSession, BatchSessionNotFoundException # Importing * is bad karma but needed here for node detection from ...invocations import * # noqa: F401 F403 @@ -106,11 +106,11 @@ async def list_batches() -> list[BatchProcessResponse]: @session_router.get( "/batch/{batch_process_id}", operation_id="get_batch", - responses={200: {"model": BatchProcess}}, + responses={200: {"model": BatchProcessResponse}}, ) async def get_batch( batch_process_id: str = Path(description="The id of the batch process to get"), -) -> BatchProcess: +) -> BatchProcessResponse: """Gets a Batch Process""" return ApiDependencies.invoker.services.batch_manager.get_batch(batch_process_id)