server/tags: fix tag category color validation

This was totally stupid...
This commit is contained in:
rr- 2016-05-11 21:37:42 +02:00
parent a5b2d835d6
commit 4cd5b8c1ac

View file

@ -51,7 +51,7 @@ def update_category_name(category, name):
def update_category_color(category, color):
if not color:
raise InvalidTagCategoryNameError('Color cannot be empty.')
if not re.match(r'^#?[a-z]+$', color):
if not re.match(r'^#?[0-9a-z]+$', color):
raise InvalidTagCategoryNameError('Invalid color.')
if util.value_exceeds_column_size(color, db.TagCategory.color):
raise InvalidTagCategoryColorError('Color is too long.')