Unable to edit due dates

82 views Asked by At

I am using Todoist's Sync API to manage my tasks. I've successfully created tasks and add Due dates. But not able to update or remove due dates from tasks.

I'm using the following:

import todoist
api = todoist.TodoistAPI('xxxx')
api.reset_state
api.sync()
TaskList = api.state['items']
item = api.items.get_by_id('4061696598')
item.update(due=None)
api.commit
api.sync()
print('done')

I've tried:

  • due=None
  • due=null
  • due=""
  • due={}

What am i missing?!

1

There are 1 answers

0
Schnouki On

You are not actually calling the commit method: instead of api.commit, you should use api.commit().

(Likewise for api.reset_state() by the way.)