diff --git a/src/main/java/it/pagopa/afm/marketplacebe/repository/CosmosRepository.java b/src/main/java/it/pagopa/afm/marketplacebe/repository/CosmosRepository.java index a0137fa..72a47e5 100644 --- a/src/main/java/it/pagopa/afm/marketplacebe/repository/CosmosRepository.java +++ b/src/main/java/it/pagopa/afm/marketplacebe/repository/CosmosRepository.java @@ -118,13 +118,15 @@ private static void buildWhereConditions( if (validBefore != null) { buildDateQuery(validBefore, false, builder); - } else if (validAfter != null) { + } + if (validAfter != null) { buildDateQuery(validAfter, false, builder); } if (expireBefore != null) { buildDateQuery(expireBefore, true, builder); - } else if (expireAfter != null) { + } + if (expireAfter != null) { buildDateQuery(expireAfter, true, builder); } }