diff --git a/src/main/java/fr/insee/survey/datacollectionmanagement/metadata/service/impl/CampaignServiceImpl.java b/src/main/java/fr/insee/survey/datacollectionmanagement/metadata/service/impl/CampaignServiceImpl.java index f2b217ee..9b0b0047 100644 --- a/src/main/java/fr/insee/survey/datacollectionmanagement/metadata/service/impl/CampaignServiceImpl.java +++ b/src/main/java/fr/insee/survey/datacollectionmanagement/metadata/service/impl/CampaignServiceImpl.java @@ -48,9 +48,9 @@ public Collection getCampaigns() { campaignMoogDto.setId(campaign.getId()); campaignMoogDto.setLabel(campaign.getCampaignWording()); - Optional dateMin = campaign.getPartitionings().stream().map(Partitioning::getOpeningDate).toList().stream() + Optional dateMin = campaign.getPartitionings().stream().map(Partitioning::getOpeningDate) .min(Comparator.comparing(Date::getTime)); - Optional dateMax = campaign.getPartitionings().stream().map(Partitioning::getClosingDate).toList().stream() + Optional dateMax = campaign.getPartitionings().stream().map(Partitioning::getClosingDate) .max(Comparator.comparing(Date::getTime)); if (dateMin.isPresent() && dateMax.isPresent()) {