From 7d3a4501f91c0e0091ac4faf60a18df5346a5da1 Mon Sep 17 00:00:00 2001 From: Alireza Fatehi <107924035+alireza-dhp@users.noreply.github.com> Date: Mon, 14 Oct 2024 13:26:13 +0200 Subject: [PATCH] Update ExternalDataApiV1Controller.java The timestamp in the storeExternalBulk function should be within the interval. --- .../more/data/controller/ExternalDataApiV1Controller.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/redlink/more/data/controller/ExternalDataApiV1Controller.java b/src/main/java/io/redlink/more/data/controller/ExternalDataApiV1Controller.java index 1d0ae97..ad97620 100644 --- a/src/main/java/io/redlink/more/data/controller/ExternalDataApiV1Controller.java +++ b/src/main/java/io/redlink/more/data/controller/ExternalDataApiV1Controller.java @@ -69,7 +69,7 @@ public ResponseEntity storeExternalBulk(String moreApiToken, EndpointDataB endpointDataBulkDTO.getDataPoints().stream() .map(ExternalDataDTO::getTimestamp) - .map(timestamp -> timestamp.isBefore(interval.getStart()) || timestamp.isAfter(interval.getEnd())) + .map(timestamp -> !(timestamp.isBefore(interval.getStart()) || timestamp.isAfter(interval.getEnd()))) .filter(v -> v) .findFirst() .orElseThrow(BadRequestException::TimeFrame);