fix: clicking on road without events should not cause 500 error

This commit is contained in:
Paul Bienkowski 2021-12-03 18:12:00 +01:00
parent 69e8591fae
commit 776275c52b

View file

@ -84,6 +84,9 @@ async def mapdetails_road(req):
arrays = numpy.array(arrays).T.astype(numpy.float64)
if len(arrays) == 0:
arrays = numpy.array([[], [], []])
def array_stats(arr, rounder):
arr = arr[~numpy.isnan(arr)]
n = len(arr)