From be7693a73d5cfdf334dd29c48782ac5c4bc525f2 Mon Sep 17 00:00:00 2001 From: Mark Carrington Date: Thu, 6 Sep 2018 22:50:35 +0100 Subject: [PATCH] Assume md/dl units for temp targets created through Nightscout --- .../java/info/nightscout/androidaps/db/DatabaseHelper.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/db/DatabaseHelper.java b/app/src/main/java/info/nightscout/androidaps/db/DatabaseHelper.java index a7ca159794..3d19a7b1ff 100644 --- a/app/src/main/java/info/nightscout/androidaps/db/DatabaseHelper.java +++ b/app/src/main/java/info/nightscout/androidaps/db/DatabaseHelper.java @@ -27,6 +27,7 @@ import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; +import info.nightscout.androidaps.Constants; import info.nightscout.androidaps.MainApp; import info.nightscout.androidaps.data.OverlappingIntervals; import info.nightscout.androidaps.data.Profile; @@ -698,7 +699,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper { public void createTemptargetFromJsonIfNotExists(JSONObject trJson) { try { - String units = JsonHelper.safeGetString(trJson, "units", ProfileFunctions.getInstance().getProfileUnits()); + String units = JsonHelper.safeGetString(trJson, "units", Constants.MGDL); TempTarget tempTarget = new TempTarget() .date(trJson.getLong("mills")) .duration(trJson.getInt("duration"))