From c8cb5b74c09a37334a6e29c00962b3bec5257555 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 4 Mar 2019 18:57:08 +0100 Subject: [PATCH] Do not fill pygal chart with None value pygal call max on the values so it raises a TypeError when comparing the number with None on Python3. issue8147 review50791002 --- sale_reporting.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sale_reporting.py b/sale_reporting.py index 28c1d30d8b..7bfa980571 100644 --- a/sale_reporting.py +++ b/sale_reporting.py @@ -167,7 +167,7 @@ class Abstract(ModelSQL): name = name[:-len('_trend')] if pygal: chart = pygal.Line() - chart.add('', [getattr(ts, name) if ts else None + chart.add('', [getattr(ts, name) if ts else 0 for ts in self.time_series_all]) return chart.render_sparktext()