Fix doppia response in processReport

This commit is contained in:
2024-11-05 10:56:35 +01:00
parent 04e02d46a7
commit 7c5ee10a4f

View File

@@ -72,9 +72,9 @@ public class EmsEngineController {
if (bytes != null) {
fi.setFileb64Content(new String(Base64.encodeBase64(bytes)));
response.add(new ServiceRestResponse(EsitoType.OK, multiDBTransactionManager.getPrimaryDatasource().getProfile(), fi));
} else {
response.add(ServiceRestResponse.createNegativeResponse("Nessun report generato!"));
}
response.add(ServiceRestResponse.createNegativeResponse("Nessun report generato!"));
} catch (JRException e) {
logger.error(e + " - Cause: " + e.getCause());
response.add(ServiceRestResponse.createNegativeResponse(configuration, e));