diff --git a/brewman/brewman/routers/reports/non_contract_purchase.py b/brewman/brewman/routers/reports/non_contract_purchase.py index d1075ae5..54a29c16 100644 --- a/brewman/brewman/routers/reports/non_contract_purchase.py +++ b/brewman/brewman/routers/reports/non_contract_purchase.py @@ -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(