Browse Source

more shade of green

boyska 4 years ago
parent
commit
b94ae89e2a
1 changed files with 2 additions and 6 deletions
  1. 2 6
      rxmap/rxmapp/models.py

+ 2 - 6
rxmap/rxmapp/models.py

@@ -42,13 +42,9 @@ class RapportoRicezione(models.Model):
 
     @property
     def colore(self):
+        colors = ['red', 'yellow', 'orange', '#90c90d', 'green']
         c = int(self.comprensibile)
-        print(repr(c))
-        if c > 3:
-            return "green"
-        if c > 1:
-            return "yellow"
-        return "red"
+        return colors[c-1]
 
     @property
     def radius(self):