Fix BGDatum json import ("_id" from aaps are always long but not "_id" from OpenAPS)

This commit is contained in:
Philoul 2022-06-17 21:55:23 +02:00
parent 44abb7b31b
commit d06d5f6b02

View file

@ -31,7 +31,7 @@ class BGDatum {
constructor(json: JSONObject, dateUtil: DateUtil) {
this.dateUtil = dateUtil
try {
if (json.has("_id")) id = json.getLong("_id")
//if (json.has("_id")) id = json.getLong("_id")
if (json.has("date")) date = json.getLong("date")
if (json.has("sgv")) value = json.getDouble("sgv")
if (json.has("direction")) direction = TrendArrow.fromString(json.getString("direction"))