Skip to content

Commiting tasks to Todoist fails #32

Description

@itsmegb

When autodoist attempts to commit changes to Todoist, it fails with the error

2023-01-16 16:38:25 DEBUG    check_header: no right model found
Traceback (most recent call last):
  File "/Users/georgeboddey/Code/personal/autodoist/autodoist.py", line 1556, in <module>
    main()
  File "/Users/georgeboddey/Code/personal/autodoist/autodoist.py", line 1514, in main
    overview_task_ids, overview_task_labels = autodoist_magic(
  File "/Users/georgeboddey/Code/personal/autodoist/autodoist.py", line 1126, in autodoist_magic
    api = modify_task_headers(api, task, section_tasks, header_all_in_p,
  File "/Users/georgeboddey/Code/personal/autodoist/autodoist.py", line 754, in modify_task_headers
    api = commit_content_update(api, task.id, content)
  File "/Users/georgeboddey/Code/personal/autodoist/autodoist.py", line 468, in commit_content_update
    api.queue.append(data)
AttributeError: 'int' object has no attribute 'queue'

Looking at the code, it appears that the find_and_headerify_all_children function returns '0', instead of the api object, meaning we loose our connection to the Todoist API.

Updating the linked line to return api should fix the issue.

return 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions