RED-1910: Ignore not exisiting report templates

This commit is contained in:
Dominique Eifländer 2021-08-05 11:52:18 +02:00
parent 89a796657e
commit 1cb593e245

View File

@ -62,6 +62,7 @@ public class ReportGenerationService {
List<ReportTemplate> singleFilesTemplates = new ArrayList<>();
List<MultiFileWorkbook> multiFileWorkbooks = new ArrayList<>();
for (String templateId : reportMessage.getTemplateIds()) {
try {
ReportTemplate reportTemplate = reportTemplateClient.getReportTemplate(reportMessage.getDossierTemplateId(), templateId);
if (reportTemplate.isMultiFileReport()) {
byte[] excelTemplate = reportStorageService.getReportTemplate(reportTemplate.getStorageId());
@ -75,6 +76,9 @@ public class ReportGenerationService {
} else {
singleFilesTemplates.add(reportTemplate);
}
} catch (Exception e){
log.warn("Skipping reportTemplate with id {}", templateId);
}
}
int i = 1;