From d5baac44122fe738b35f3e3fff73c978c4ba1d62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 13 Jul 2015 23:58:23 +0200 Subject: [PATCH] Remove boolean expression in order issue4852 review15541002 --- dashboard.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dashboard.py b/dashboard.py index 973cd650f1..f3805831dc 100644 --- a/dashboard.py +++ b/dashboard.py @@ -1,6 +1,7 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. from sql import Null +from sql.conditionals import Case from trytond.model import ModelView, ModelSQL, fields from trytond.transaction import Transaction @@ -47,4 +48,4 @@ class DashboardAction(ModelSQL, ModelView): @staticmethod def order_sequence(tables): table, _ = tables[None] - return [table.sequence == Null, table.sequence] + return [Case((table.sequence == Null, 0), else_=1), table.sequence]