More robust get tags
parent
e1ea8d498c
commit
000baf41d9
|
@ -21,14 +21,16 @@ from django.db import connection
|
|||
def _get_stories_tags(project):
|
||||
result = set()
|
||||
for tags in project.user_stories.values_list("tags", flat=True):
|
||||
result.update(tags)
|
||||
if tags:
|
||||
result.update(tags)
|
||||
return result
|
||||
|
||||
|
||||
def _get_issues_tags(project):
|
||||
result = set()
|
||||
for tags in project.issues.values_list("tags", flat=True):
|
||||
result.update(tags)
|
||||
if tags:
|
||||
result.update(tags)
|
||||
return result
|
||||
|
||||
|
||||
|
|
|
@ -39,6 +39,9 @@ def remove_unused_tags(project):
|
|||
|
||||
|
||||
def update_project_tags_colors_handler(instance):
|
||||
if instance.tags is None:
|
||||
instance.tags = []
|
||||
|
||||
for tag in instance.tags:
|
||||
defined_tags = map(lambda x: x[0], instance.project.tags_colors)
|
||||
if tag not in defined_tags:
|
||||
|
|
Loading…
Reference in New Issue