Fix
This commit is contained in:
@ -190,14 +190,16 @@ def show_list(
|
||||
return modifier_categories
|
||||
|
||||
|
||||
@router.get("/for-product/{id_}")
|
||||
@router.get("/for-product/{sku_id}")
|
||||
def for_product(
|
||||
id_: uuid.UUID,
|
||||
sku_id: uuid.UUID,
|
||||
date_: date = Depends(effective_date),
|
||||
user: UserToken = Security(get_user),
|
||||
) -> list[ModifierCategoryForProduct]:
|
||||
with SessionFuture() as db:
|
||||
product: Product = db.execute(select(Product).where(Product.id == id_)).scalar_one()
|
||||
product: Product = db.execute(
|
||||
select(Product).join(Product.skus).where(StockKeepingUnit.id == sku_id)
|
||||
).scalar_one()
|
||||
|
||||
return [
|
||||
ModifierCategoryForProduct(
|
||||
|
||||
Reference in New Issue
Block a user