Skip to content

Commit

Permalink
Merge pull request #172 from MORE-Platform/alireza-dhp-patch-timestamp
Browse files Browse the repository at this point in the history
Update ExternalDataApiV1Controller.java
  • Loading branch information
alireza-dhp authored Oct 14, 2024
2 parents 624bf12 + 7d3a450 commit 592ca76
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public ResponseEntity<Void> 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);
Expand Down

0 comments on commit 592ca76

Please sign in to comment.