reports-service fix NPE in Execution LiabilitiesClaimsReportBuilder report

This commit is contained in:
AKurakin 2023-05-29 19:22:39 +03:00
parent 4218d95a49
commit d8f79b85ee

View file

@ -92,6 +92,10 @@ public abstract class LiabilitiesClaimsReportBuilder<P> extends CSVReportBuilder
Company company = companyImdg.getSingleObjectByID(execution.getCompanyId());
if (!WorkflowStatus.Active.equalsByKey(company.getWorkflowStatus())) continue;
if (execution.getSessionId() == null) {
log.warn("On Execution[{}] sessionId was null. Skip in report.", execution.getId());
continue;
}
Registry registry = registryImdg.getSingleObjectByFieldValues(Map.of("companyId", execution.getCompanyId()));
Collection<Registry> registriesForSessionId = registryImdg.getCollectionObjectsByFieldValues(
Map.of("sessionId", execution.getSessionId())