From 0384f72cbd994cf0d9d219cc404b9543e15d48dc Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Tue, 15 Oct 2024 14:25:15 -0400 Subject: [PATCH] [tasks] Fix webhook for Todoist --- vrobbler/apps/scrobbles/scrobblers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vrobbler/apps/scrobbles/scrobblers.py b/vrobbler/apps/scrobbles/scrobblers.py index 31f03b4..83db317 100644 --- a/vrobbler/apps/scrobbles/scrobblers.py +++ b/vrobbler/apps/scrobbles/scrobblers.py @@ -311,7 +311,7 @@ def manual_scrobble_from_url(url: str, user_id: int) -> Scrobble: def todoist_scrobble_task_finish(todoist_task: dict, user_id: int) -> Scrobble: - scrobble = Scrobble.obejcts.filter( + scrobble = Scrobble.objects.filter( user_id=user_id, logdata__todoist_id=todoist_task.get("todoist_id") ) @@ -327,6 +327,8 @@ def todoist_scrobble_task_finish(todoist_task: dict, user_id: int) -> Scrobble: def todoist_scrobble_task(todoist_task: dict, user_id: int) -> Scrobble: + prefix = "" + suffix = "" for label in todoist_task["todoist_label_list"]: if label in TODOIST_TITLE_PREFIX_LABELS: prefix = label