tcl: handle invalid color value (#35357)
This commit is contained in:
parent
6425fa1c1f
commit
b47cc866c3
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue