diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/IobCobCalculator/IobCobCalculatorPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/IobCobCalculator/IobCobCalculatorPlugin.java index 6a12d77c30..300bfb5cd1 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/IobCobCalculator/IobCobCalculatorPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/IobCobCalculator/IobCobCalculatorPlugin.java @@ -366,6 +366,8 @@ public class IobCobCalculatorPlugin implements PluginBase { // check if data already exists long bgTime = bucketed_data.get(i).date; bgTime = roundUpTime(bgTime); + if (bgTime > System.currentTimeMillis()) + continue; Profile profile = MainApp.getConfigBuilder().getProfile(bgTime); AutosensData existing;