server/tags: allow uppercase tag category colors

i.e. colors such as "#FF0000"
This commit is contained in:
rr- 2017-10-08 21:38:28 +02:00
parent cdf454818c
commit f8c7375b01
1 changed files with 1 additions and 1 deletions

View File

@ -105,7 +105,7 @@ def update_category_color(category: model.TagCategory, color: str) -> None:
assert category
if not color:
raise InvalidTagCategoryColorError('Color cannot be empty.')
if not re.match(r'^#?[0-9a-z]+$', color):
if not re.match(r'^#?[0-9A-Za-z]+$', color):
raise InvalidTagCategoryColorError('Invalid color.')
if util.value_exceeds_column_size(color, model.TagCategory.color):
raise InvalidTagCategoryColorError('Color is too long.')