создание, правка, удаление, скрытие инструмента

This commit is contained in:
2025-12-12 23:50:38 +03:00
parent 8b38d69980
commit f85ca7d002
19 changed files with 1607 additions and 162 deletions
+7
View File
@@ -138,6 +138,13 @@ class StockHandler:
stocks = await CRUD.read(query, True)
return await filterQuantity(stocks, filtered)
async def checkToolkitExists(toolkitId: int) -> bool:
from db import CRUD
query = select(Stock).where(Stock.toolkit_id == toolkitId)
stocks = await CRUD.read(query)
return True if stocks else False
async def getByToolboxIdAndToolkitId(
toolboxId: int, toolkitId: int, filtered: bool = True
) -> list[dict]: