Don't crash on no-data passed to svg charts
authorMagnus Hagander <magnus@hagander.net>
Wed, 13 Nov 2024 13:25:44 +0000 (14:25 +0100)
committerMagnus Hagander <magnus@hagander.net>
Wed, 13 Nov 2024 13:25:44 +0000 (14:25 +0100)
commit39655363fa401657b8ba01fd6711edf03935a88c
tree7240a13356866112327fb5a5a8d75a5e532e7503
parentafe20375298286b8b9c6b4f994b092f0071a645e
Don't crash on no-data passed to svg charts

This could cause a divide-by-zero in some cases. Instead render the text
"NO DATA". Normally, the entire svg would be exluded in this case, but
in case it's not this will at least work.
postgresqleu/util/templatetags/svgcharts.py
template/util/svgbarchart.svg
template/util/svgpiechart.svg