pyronear / pyro-platform

Detection & monitoring platform of wildfires
https://platform.pyronear.org/
Apache License 2.0
10 stars 11 forks source link

No sites bug #99

Open MateoLostanlen opened 1 year ago

MateoLostanlen commented 1 year ago

It's a rare case, but if a user doesn't have a site, the platform crashes! Because there's a zero division here


Traceback (most recent call last):
  File "/home/mateo/pyronear/platform/pyro-platform/app/main.py", line 655, in manage_login_modal
    lat = latitudes / len(response_sites)
ZeroDivisionError: division by zero
RonanMorgan commented 3 months ago

it should not be possible for a customer not to have a site, no ?