Skip to content

Commit

Permalink
fix: Assign null value when parser return empty string [DHIS2-13275] (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
enricocolasante authored Aug 17, 2023
1 parent 09859bb commit 5165199
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/hisp/dhis/rules/RuleConditionEvaluator.java
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,9 @@ private RuleEffect create( @Nonnull Rule rule,
RuleActionAssign ruleActionAssign = (RuleActionAssign) ruleAction;
String data = process( ruleActionAssign.data(), valueMap, supplementaryData, Expression.Mode.RULE_ENGINE_ACTION);
updateValueMap( ruleActionAssign.field(), RuleVariableValue.create( data, RuleValueType.TEXT ), valueMap );
if ( StringUtils.isEmpty( data ) && StringUtils.isEmpty( ruleActionAssign.data() ) )
if ( StringUtils.isEmpty( data ) )
{
return RuleEffect.create( rule.uid(), ruleAction, ruleActionAssign.data() );
return RuleEffect.create( rule.uid(), ruleAction, null );
}
else
{
Expand Down

0 comments on commit 5165199

Please sign in to comment.