From fa8baeff9d6c640e18c7f4f1cf3690413ccf684a Mon Sep 17 00:00:00 2001 From: cdricms <36056008+cdricms@users.noreply.github.com> Date: Sat, 27 Sep 2025 18:49:15 +0200 Subject: [PATCH] Debugging --- Sources/OpenFoodFacts/Schemas/Product.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Sources/OpenFoodFacts/Schemas/Product.swift b/Sources/OpenFoodFacts/Schemas/Product.swift index cabbdc3..2294066 100644 --- a/Sources/OpenFoodFacts/Schemas/Product.swift +++ b/Sources/OpenFoodFacts/Schemas/Product.swift @@ -205,8 +205,14 @@ public class Product: Codable, ObjectDebugger { public var waterQuantity: Units.UnitValue? { guard let ingredient = ingredients?.first(where: { $0.isWater }) else { + print("The ingredient was not found.") return nil } + print(ingredient) + + print("Product quantity", productQuantity) + print("Percent estimate", ingredient.percentEstimate) + print("Raw unit", productQuantityUnit) guard let quantity = productQuantity, let estimate = ingredient.percentEstimate,