diff --git a/config-data-executor/src/main/java/org/micord/service/DownloadService.java b/config-data-executor/src/main/java/org/micord/service/DownloadService.java index 0f58b36..e89dbf4 100644 --- a/config-data-executor/src/main/java/org/micord/service/DownloadService.java +++ b/config-data-executor/src/main/java/org/micord/service/DownloadService.java @@ -119,8 +119,8 @@ public class DownloadService { private String prepareRequestURL(DownloadRequest request, LocalDate startDate, LocalDate endDate) { return request.getRequestURL() - .replace("${startDate}", startDate.toString()) - .replace("${endDate}", endDate.toString()) + .replace("${startDate}", (startDate != null) ? startDate.toString() : "") + .replace("${endDate}", (endDate != null) ? endDate.toString() : "") .replace("${DB}", request.getSqlConnectionParams().getJdbcDatabase()); }