check for duration in json
This commit is contained in:
parent
a47fe757b9
commit
455383cfd5
1 changed files with 1 additions and 1 deletions
|
@ -1353,7 +1353,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
extendedBolus.date = trJson.getLong("mills");
|
extendedBolus.date = trJson.getLong("mills");
|
||||||
extendedBolus.durationInMinutes = trJson.getInt("duration");
|
extendedBolus.durationInMinutes = trJson.has("duration") ? trJson.getInt("duration") : 0;
|
||||||
extendedBolus.insulin = trJson.getDouble("relative");
|
extendedBolus.insulin = trJson.getDouble("relative");
|
||||||
extendedBolus._id = trJson.getString("_id");
|
extendedBolus._id = trJson.getString("_id");
|
||||||
createOrUpdate(extendedBolus);
|
createOrUpdate(extendedBolus);
|
||||||
|
|
Loading…
Reference in a new issue