[Backport] Issue 4931: Tag Creation Caps Bug

remotes/origin/issue/4217/improving-mail-design
Alejandro Alonso 2017-02-10 08:55:30 +01:00 committed by David Barragán Merino
parent 04ca4d5b7f
commit 3abd51f306
1 changed files with 2 additions and 0 deletions

View File

@ -34,6 +34,7 @@ def create_tag(project, tag, color):
def edit_tag(project, from_tag, to_tag, color): def edit_tag(project, from_tag, to_tag, color):
to_tag = to_tag.lower()
sql = """ sql = """
UPDATE userstories_userstory UPDATE userstories_userstory
SET tags = array_distinct(array_replace(tags, %(from_tag)s, %(to_tag)s)) SET tags = array_distinct(array_replace(tags, %(from_tag)s, %(to_tag)s))
@ -64,6 +65,7 @@ def edit_tag(project, from_tag, to_tag, color):
def rename_tag(project, from_tag, to_tag, **kwargs): def rename_tag(project, from_tag, to_tag, **kwargs):
# Kwargs can have a color parameter # Kwargs can have a color parameter
update_color = "color" in kwargs update_color = "color" in kwargs
to_tag = to_tag.lower()
if update_color: if update_color:
color = kwargs.get("color") color = kwargs.get("color")
else: else: