This commit is contained in:
cdricms
2025-12-06 18:15:17 +01:00
parent bdc4bb37f5
commit 44420002c7

View File

@@ -35,10 +35,10 @@ public struct NutriscoreData: Sendable, Codable {
isBeverage = try container.decodeIfPresent( isBeverage = try container.decodeIfPresent(
Int.self, forKey: .isBeverage) Int.self, forKey: .isBeverage)
isCheese = try container.decodeIfPresent(Int.self, forKey: .isCheese) isCheese = try container.decodeStringOrInt(forKey: .isCheese)
isWater = try container.decodeStringOrInt(forKey: .isWater) isWater = try container.decodeStringOrInt(forKey: .isWater)
isFat = try container.decodeIfPresent(Int.self, forKey: .isFat) isFat = try container.decodeStringOrInt(forKey: .isFat)
energy = try container.decodeIfPresent(Int.self, forKey: .energy) energy = try container.decodeStringOrInt(forKey: .energy)
} }