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);