Fix query for getting unhandled reports
This commit is contained in:
parent
ee78cf2bb9
commit
373c82c11b
@ -75,10 +75,10 @@ public class ReportRepository
|
||||
private static final String GET_UNHANDLED_REPORTS = "SELECT reports.id FROM reports" +
|
||||
" LEFT JOIN reportResults ON reports.id = reportResults.reportId" +
|
||||
" LEFT JOIN reportHandlers ON reports.id = reportHandlers.reportId" +
|
||||
" AND (reportHandlers.aborted IS FALSE" +
|
||||
" AND reportHandlers.handlerId != ?)" +
|
||||
"WHERE reportResults.reportId IS NULL" +
|
||||
" AND (reportHandlers.reportId IS NULL" +
|
||||
" OR (reportHandlers.aborted IS TRUE" +
|
||||
" AND reportHandlers.handlerId != ?));";
|
||||
" AND reportHandlers.reportId IS NULL;";
|
||||
|
||||
private static final String GET_ONGOING_REPORT = "SELECT reports.id FROM reports" +
|
||||
" LEFT JOIN reportResults ON reports.id = reportResults.reportId" +
|
||||
|
Loading…
Reference in New Issue
Block a user