diff --git a/rxmap/rxmapp/models.py b/rxmap/rxmapp/models.py index fb1bba2..11dbc9b 100644 --- a/rxmap/rxmapp/models.py +++ b/rxmap/rxmapp/models.py @@ -52,9 +52,9 @@ class RapportoRicezione(models.Model): @property def colore(self): - colors = ['red', 'yellow', 'orange', '#90c90d', 'green'] + colors = ['darkred', 'red', 'yellow', 'orange', '#90c90d', 'green'] c = int(self.comprensibile) - return colors[c-1] + return colors[c] @property def radius(self): diff --git a/rxmap/rxmapp/views.py b/rxmap/rxmapp/views.py index 82bbd0f..556ebc2 100644 --- a/rxmap/rxmapp/views.py +++ b/rxmap/rxmapp/views.py @@ -33,7 +33,7 @@ def rapporto_add(request): lat=float(request.POST["lat"]), lng=float(request.POST["lng"]), comprensibile=int(request.POST["comprensibile"]), - stabilita=int(request.POST["comprensibile"]), + stabilita=int(request.POST["stabilita"]), tipo_radio=TipoRadio.objects.get(pk=request.POST["tiporadio"]), ) r.save()