diff --git a/implementation/src/main/java/info/nightscout/implementation/plugin/PluginStore.kt b/implementation/src/main/java/info/nightscout/implementation/plugin/PluginStore.kt index 62b70ab7ce..bfb809e74a 100644 --- a/implementation/src/main/java/info/nightscout/implementation/plugin/PluginStore.kt +++ b/implementation/src/main/java/info/nightscout/implementation/plugin/PluginStore.kt @@ -187,7 +187,10 @@ class PluginStore @Inject constructor( get() = activeAPSStore ?: checkNotNull(activeAPSStore) { "No APS selected" } override val activePump: Pump - get() = activePumpStore ?: checkNotNull(activePumpStore) { "No pump selected" } + get() = activePumpStore + // Following line can be used only during initialization + ?: getTheOneEnabledInArray(getSpecificPluginsList(PluginType.PUMP), PluginType.PUMP) as Pump? + ?: checkNotNull(activePumpStore) { "No pump selected" } override val activeSensitivity: Sensitivity get() = activeSensitivityStore