[tasks] Fix bug in emacs labels

This commit is contained in:
2025-06-24 10:52:47 -04:00
parent 32ec65116b
commit c68b0e9d7e
2 changed files with 6 additions and 7 deletions

View File

@ -34,8 +34,7 @@ from videos.models import Video
from webpages.models import WebPage
from vrobbler.apps.tasks.constants import (
TODOIST_TITLE_PREFIX_LABELS,
TODOIST_TITLE_SUFFIX_LABELS,
TODOIST_TITLE_LABELS
)
logger = logging.getLogger(__name__)
@ -557,11 +556,9 @@ def emacs_scrobble_task(
suffix = ""
source_id = task_data.get("source_id")
for label in task_data.get("labels"):
if label in TODOIST_TITLE_PREFIX_LABELS:
prefix = label
if label in TODOIST_TITLE_SUFFIX_LABELS:
suffix = label
for label in task_data.get("labels", []):
if label in TODOIST_TITLE_LABELS:
title = label
if not prefix and not suffix:
logger.warning(