lims: results report: fix 'Single sending Ready' field computation

This commit is contained in:
Adrián Bernardi 2021-05-31 19:19:22 -03:00
parent 0b2571cb0e
commit 8a27fb7f76
1 changed files with 3 additions and 2 deletions

View File

@ -184,8 +184,9 @@ class ResultsReport(ModelSQL, ModelView):
'ON rd.report_version = rv.id '
'WHERE rv.results_report = %s '
'AND ad.report_grouper = %s '
'AND ad.report = TRUE '
'AND ad.state NOT IN (\'reported\', \'annulled\')',
'AND nl.report = TRUE '
'AND nl.annulled = FALSE '
'AND nl.results_report IS NULL',
(r.id, r.report_grouper,))
if cursor.fetchone()[0] > 0:
continue