Allow to edit tags and set no color
parent
534445b30c
commit
54baf7b4dc
|
@ -77,7 +77,7 @@ class EditTagTagValidator(ProjectTagValidator):
|
|||
|
||||
def validate_color(self, attrs, source):
|
||||
color = attrs.get(source, None)
|
||||
if not re.match('^\#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$', color):
|
||||
if color and not re.match('^\#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$', color):
|
||||
raise ValidationError(_("The color is not a valid HEX color."))
|
||||
|
||||
return attrs
|
||||
|
|
Loading…
Reference in New Issue