tcl: handle invalid color value (#35357)

This commit is contained in:
Frédéric Péters 2019-08-18 09:49:11 +02:00
parent 6425fa1c1f
commit b47cc866c3
1 changed files with 1 additions and 1 deletions

View File

@ -187,7 +187,7 @@ class Line(models.Model):
}
def save(self, *args, **kwargs):
if not self.couleur:
if not self.couleur or self.couleur == 'None':
self.couleur = '255 255 255'
self.html_bg_color = '%02x%02x%02x' % tuple(int(x) for x in self.couleur.split())
self.html_fg_color = self.get_foreground_colour(self.html_bg_color)