From b2375d54c728ac0ebab124b01cf28b4e1b653b2b Mon Sep 17 00:00:00 2001 From: Carlos Rafael Giani Date: Sat, 26 Nov 2022 23:06:06 +0100 Subject: [PATCH] combov2: Use profileName in getJSONStatus() The value of profileName comes from profileFunction.getProfileName(), so using that function directly is redundant. Signed-off-by: Carlos Rafael Giani --- .../kotlin/info/nightscout/pump/combov2/ComboV2Plugin.kt | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/pump/combov2/src/main/kotlin/info/nightscout/pump/combov2/ComboV2Plugin.kt b/pump/combov2/src/main/kotlin/info/nightscout/pump/combov2/ComboV2Plugin.kt index 31b20116f2..bc2f0c3717 100644 --- a/pump/combov2/src/main/kotlin/info/nightscout/pump/combov2/ComboV2Plugin.kt +++ b/pump/combov2/src/main/kotlin/info/nightscout/pump/combov2/ComboV2Plugin.kt @@ -1135,13 +1135,7 @@ class ComboV2Plugin @Inject constructor ( "Cannot include base basal rate in JSON status " + "since no basal profile is currently active" ) - try { - // TODO: What about the profileName argument? - // Is it obsolete? - put("ActiveProfile", profileFunction.getProfileName()) - } catch (e: Exception) { - aapsLogger.error("Unhandled exception", e) - } + put("ActiveProfile", profileName) when (val alert = lastComboAlert) { is AlertScreenContent.Warning -> put("WarningCode", alert.code)