浏览代码

[tasks] Fix bad matching in label titles

Colin Powell 1 月之前
父节点
当前提交
224c165d72
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      vrobbler/apps/tasks/utils.py

+ 3 - 1
vrobbler/apps/tasks/utils.py

@@ -9,8 +9,10 @@ def get_title_from_labels(labels: list[str], user_context_labels: list[str] = []
     task_context_labels: list = user_context_labels or settings.DEFAULT_TASK_CONTEXT_TAG_LIST
     for label in labels:
         # TODO We may also want to take a user list of labels instead
+        label = label.capitalize()
         if label in task_context_labels:
-            title = label.capitalize()
+            title = label
+            continue
 
     if title == "Unknown":
         logger.warning(