Fix for MySQL double formatting. It comes back as a float

This commit is contained in:
Jonathan Guthrie 2018-04-19 11:45:59 -04:00
parent 8b0578ef36
commit 8e6777dc4e
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ extension StORM {
// Double
// =======================================================================================
public static func double(_ data: [String: Any], _ name: String, _ def: Double? = Double()) -> Double? {
return data[name] as? Double ?? def
return Double((data[name] as? Float) ?? Float(def ?? 0.00))
}
// =======================================================================================