Skip to content

Commit

Permalink
fix(Artificial-Pancreas#961): Fix decimal conversion of specific valu…
Browse files Browse the repository at this point in the history
…es like .14, .28 etc
  • Loading branch information
bastiaan.verhaar committed Dec 16, 2024
1 parent b7dd8f1 commit e5eb3b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion FreeAPS/Sources/Models/BasalProfileEntry.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ extension BasalProfileEntry {
let container = try decoder.container(keyedBy: CodingKeys.self)
let start = try container.decode(String.self, forKey: .start)
let minutes = try container.decode(Int.self, forKey: .minutes)
let rate = try container.decode(Double.self, forKey: .rate).decimal ?? .zero
let rate = try Decimal(floatLiteral: container.decode(Double.self, forKey: .rate))

self = BasalProfileEntry(start: start, minutes: minutes, rate: rate)
}
Expand Down

0 comments on commit e5eb3b4

Please sign in to comment.