A report is no longer active if a result for it has been set
This commit is contained in:
parent
29b1110f6b
commit
aadb3df715
@ -70,7 +70,7 @@ public class Report
|
||||
return _category;
|
||||
}
|
||||
|
||||
public Optional<ReportResult> getReportResult()
|
||||
public Optional<ReportResult> getResult()
|
||||
{
|
||||
return Optional.ofNullable(_reportResult);
|
||||
}
|
||||
|
@ -262,6 +262,11 @@ public class ReportManager
|
||||
*/
|
||||
public CompletableFuture<Boolean> isActiveReport(Report report)
|
||||
{
|
||||
if (report.getResult().isPresent())
|
||||
{
|
||||
return CompletableFuture.completedFuture(true);
|
||||
}
|
||||
|
||||
return calculatePriority(report).thenApply(priority -> priority > 0);
|
||||
}
|
||||
|
||||
|
@ -406,7 +406,7 @@ public class ReportRepository
|
||||
setReportHandlerStatement.execute();
|
||||
}
|
||||
|
||||
Optional<ReportResult> reportResultOptional = report.getReportResult();
|
||||
Optional<ReportResult> reportResultOptional = report.getResult();
|
||||
if (reportResultOptional.isPresent())
|
||||
{
|
||||
PreparedStatement setReportResultStatement = connection.prepareStatement(SET_REPORT_RESULT);
|
||||
|
Loading…
Reference in New Issue
Block a user