FIX colore e add

This commit is contained in:
boyska 2020-03-08 00:02:00 +01:00
parent 9d07653817
commit 1e1a446655
2 changed files with 3 additions and 3 deletions

View file

@ -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):

View file

@ -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()