Fix: Checking the wrong id

This commit is contained in:
Amritanshu Agrawal 2021-11-10 21:41:12 +05:30
parent 3dc8f0151e
commit 240ecf3fbb
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ def report(db: Session) -> List[schemas.NonContractPurchase]:
p, u = db.execute(
select(Product.name, StockKeepingUnit.units)
.join(Product.skus)
.where(StockKeepingUnit.product_id == item.sku_id)
.where(StockKeepingUnit.id == item.sku_id)
).one()
list_.append(
schemas.NonContractPurchase(