создание, правка, удаление, скрытие инструмента
This commit is contained in:
@@ -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]:
|
||||
|
||||
Reference in New Issue
Block a user