Move check forˆ 404 for unknown report name

This commit is contained in:
2023-01-31 13:36:03 -06:00
parent 583d716f94
commit 27b48b62f9

View File

@ -178,6 +178,12 @@ public class QJavalinProcessHandler
String reportName = context.pathParam("reportName");
String format = context.queryParam("format");
QReportMetaData report = QJavalinImplementation.qInstance.getReport(reportName);
if(report == null)
{
throw (new QNotFoundException("Report [" + reportName + "] is not found."));
}
ReportFormat reportFormat = QJavalinImplementation.getReportFormat(context, optionalFilename, format);
if(reportFormat == null)
{
@ -198,12 +204,6 @@ public class QJavalinProcessHandler
reportInput.setInputValues(null); // todo!
reportInput.setFilename(filename);
QReportMetaData report = QJavalinImplementation.qInstance.getReport(reportName);
if(report == null)
{
throw (new QNotFoundException("Report [" + reportName + "] is not found."));
}
//////////////////////////////////////////////////////////////
// process the report's input fields, from the query string //
//////////////////////////////////////////////////////////////