[Backport] Fixing error for empty tags

remotes/origin/issue/4217/improving-mail-design
Alejandro Alonso 2016-12-30 09:28:57 +01:00
parent 9e6bd153fa
commit afceb5d24b
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ class TagsAndTagsColorsField(serializers.WritableField):
color = tag[1] color = tag[1]
if isinstance(name, str): if isinstance(name, str):
if color is None: if color is None or color == "":
continue continue
if isinstance(color, str) and re.match('^\#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$', color): if isinstance(color, str) and re.match('^\#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$', color):