diff --git a/dhis2-mobile-program-rules/src/main/java/org/dhis2/mobileProgramRules/RuleEngineExtensions.kt b/dhis2-mobile-program-rules/src/main/java/org/dhis2/mobileProgramRules/RuleEngineExtensions.kt index c521196cd4..eb82574a80 100644 --- a/dhis2-mobile-program-rules/src/main/java/org/dhis2/mobileProgramRules/RuleEngineExtensions.kt +++ b/dhis2-mobile-program-rules/src/main/java/org/dhis2/mobileProgramRules/RuleEngineExtensions.kt @@ -473,17 +473,8 @@ fun List.toRuleDataValue( "" } } - } else if (de?.valueType()?.isNumeric == true) { - value = if (value.isNullOrEmpty()) { - "" - } else { - try { - value.toFloat().toString() - } catch (e: Exception) { - Timber.e(e) - "" - } - } + } else if (de?.valueType()?.isNumeric == true && value.isNullOrEmpty()) { + value = "" } RuleDataValue( eventDate = event.eventDate()!!.toRuleEngineInstant(),