changeset 674bff4360fd in modules/sale:5.0
details: https://hg.tryton.org/modules/sale?cmd=changeset;node=674bff4360fd
description:
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
(grafted from 42782ca139197faf585a19d71ed21b12cff2e354)
diffstat:
sale_reporting.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r 260e3f910c2d -r 674bff4360fd sale_reporting.py
--- a/sale_reporting.py Tue Feb 19 22:09:02 2019 +0100
+++ b/sale_reporting.py Mon Mar 04 18:57:08 2019 +0100
@@ -167,7 +167,7 @@
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()