diff --git a/api/routers/toolbox.py b/api/routers/toolbox.py index ada403c..e421a45 100644 --- a/api/routers/toolbox.py +++ b/api/routers/toolbox.py @@ -70,7 +70,7 @@ async def fill_toolbox(reqDict=Depends(requestDict)): item.get("placement"), reason, ) - if success: + if "errorMessage" not in success.keys(): successCount += 1 if successCount == len(items): response["status"] = "ok" diff --git a/db/handlers/actions.py b/db/handlers/actions.py index 51c8349..c898e92 100644 --- a/db/handlers/actions.py +++ b/db/handlers/actions.py @@ -20,7 +20,7 @@ class StocksActions: price: float, placement: str, reason: str, - ) -> bool: + ) -> dict: logger.info(f"Приход инструмента {toolkit_id} на складе {toolbox_id} ...") newStocks = await StockHandler.add( toolkit_id=toolkit_id,