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
This commit is contained in:
+1
-1
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user