[task] Ooops, add task id
This commit is contained in:
@ -324,7 +324,7 @@ def todoist_scrobble_update_task(
|
||||
scrobble = Scrobble.objects.filter(
|
||||
in_progress=True,
|
||||
user_id=user_id,
|
||||
log__task_id=todoist_note.get("task_id"),
|
||||
log__todoist_id=todoist_note.get("task_id"),
|
||||
).first()
|
||||
|
||||
if not scrobble:
|
||||
@ -339,9 +339,7 @@ def todoist_scrobble_update_task(
|
||||
return
|
||||
|
||||
existing_notes = scrobble.log.get("notes", {})
|
||||
existing_notes[todoist_note.get("todoist_id")] = todoist_note.get(
|
||||
"content"
|
||||
)
|
||||
existing_notes[todoist_note.get("todoist_id")] = todoist_note.get("notes")
|
||||
scrobble.log["notes"] = existing_notes
|
||||
scrobble.save(update_fields=["log"])
|
||||
logger.info(
|
||||
|
||||
@ -61,7 +61,8 @@ def todoist_webhook(request):
|
||||
if is_note_type and is_added:
|
||||
task_data = event_data.get("item", {})
|
||||
todoist_note = {
|
||||
"todoist_id": task_data.get("id"),
|
||||
"task_id": event_data.get("item_id"),
|
||||
"todoist_id": event_data.get("id"),
|
||||
"todoist_label_list": task_data.get("labels"),
|
||||
"todoist_type": todoist_type,
|
||||
"todoist_event": todoist_event,
|
||||
|
||||
Reference in New Issue
Block a user