Procházet zdrojové kódy

[profiles] Clean up default task lookup

Colin Powell před 2 týdny
rodič
revize
833368c8d7
1 změnil soubory, kde provedl 5 přidání a 7 odebrání
  1. 5 7
      vrobbler/apps/profiles/models.py

+ 5 - 7
vrobbler/apps/profiles/models.py

@@ -141,12 +141,10 @@ class UserProfile(TimeStampedModel):
 
     @cached_property
     def task_context_tags(self) -> list[str]:
-        tag_list = [
-            t.strip().capitalize()
-            for t in self.task_context_tags_str.split(",")
-        ]
-
-        if not tag_list:
-            tag_list = settings.DEFAULT_TASK_CONTEXT_TAG_LIST
+        tag_list = settings.DEFAULT_TASK_CONTEXT_TAGS
+        tags = ""
+        if self.task_context_tags_str:
+            tags = self.task_context_tags_str
+            tag_list = [t.strip().capitalize() for t in tags.split(",")]
 
         return tag_list