Explorar o código

[tasks] Fix bad matching in label titles

Colin Powell hai 1 mes
pai
achega
224c165d72
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  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(