Mercurial > hgweb > health
changeset 4982:915a3ce9f7d5
health_reporting: Use sql Null instead of None
| author | Luis Falcon <falcon@gnuhealth.org> |
|---|---|
| date | Wed, 19 Jan 2022 23:23:47 +0000 |
| parents | 65e8b3e39596 |
| children | 75ad5662a7bb |
| files | tryton/health_reporting/wizard/wizard_top_diseases.py |
| diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/tryton/health_reporting/wizard/wizard_top_diseases.py +++ b/tryton/health_reporting/wizard/wizard_top_diseases.py @@ -22,7 +22,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # ############################################################################## -from sql import Join +from sql import Join, Null from sql.aggregate import Max, Count from trytond.model import ModelView, ModelSQL, fields from trytond.wizard import Wizard, StateView, StateAction, Button @@ -52,7 +52,8 @@ Evaluation = pool.get('gnuhealth.patient.evaluation') evaluation = Evaluation.__table__() source = evaluation - where = evaluation.diagnosis is not None + where = evaluation.diagnosis != Null + if Transaction().context.get('start_date'): where &= evaluation.evaluation_start >= \ Transaction().context['start_date']
