From d8aaf3bf5503ae3aaaf98198a82bb2591b9a89e3 Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Fri, 1 Nov 2024 12:38:49 -0400 Subject: [PATCH] [task] Little bug --- vrobbler/apps/tasks/webhooks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vrobbler/apps/tasks/webhooks.py b/vrobbler/apps/tasks/webhooks.py index f528c4c..504c814 100644 --- a/vrobbler/apps/tasks/webhooks.py +++ b/vrobbler/apps/tasks/webhooks.py @@ -30,7 +30,7 @@ def todoist_webhook(request): event_data = post_data.get("event_data", {}) is_item_type = todoist_type == "item" is_note_type = todoist_type == "note" - new_labels = event_data.get("labels") + new_labels = event_data.get("labels", []) old_labels = ( post_data.get("event_data_extra", {}) .get("old_item", {}) @@ -93,6 +93,7 @@ def todoist_webhook(request): .user_id ) + scrobble = None if todoist_task: scrobble = todoist_scrobble_task( todoist_task, user_id, stopped=task_stopped