diff --git a/src/main/java/org/gridsuite/filter/server/repositories/proxies/expertfiler/ExpertFilterRepositoryProxy.java b/src/main/java/org/gridsuite/filter/server/repositories/proxies/expertfiler/ExpertFilterRepositoryProxy.java index a65a4501..5d44d15f 100644 --- a/src/main/java/org/gridsuite/filter/server/repositories/proxies/expertfiler/ExpertFilterRepositoryProxy.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/proxies/expertfiler/ExpertFilterRepositoryProxy.java @@ -69,11 +69,13 @@ public static AbstractExpertRule entityToDto(ExpertRuleEntity filterEntity) { } case BOOLEAN -> { ExpertRuleValueEntity booleanFilterEntity = (ExpertRuleValueEntity) filterEntity; - return BooleanExpertRule.builder() + BooleanExpertRule.BooleanExpertRuleBuilder ruleBuilder = BooleanExpertRule.builder() .field(booleanFilterEntity.getField()) - .operator(booleanFilterEntity.getOperator()) - .value(Boolean.parseBoolean(booleanFilterEntity.getValue())) - .build(); + .operator(booleanFilterEntity.getOperator()); + if (booleanFilterEntity.getValue() != null) { + ruleBuilder.value(Boolean.parseBoolean(booleanFilterEntity.getValue())); + } + return ruleBuilder.build(); } case NUMBER -> { ExpertRuleValueEntity numberFilterEntity = (ExpertRuleValueEntity) filterEntity;