archive
/
todoist-github
Archived
1
Fork 0

Fix comparison and stop completing then uncompleting tasks

This commit is contained in:
Jake Howard 2020-01-11 13:06:14 +00:00
parent 060ee12314
commit 802cc5a695
Signed by: jake
GPG Key ID: 57AFB45680EDD477
1 changed files with 2 additions and 2 deletions

View File

@ -26,10 +26,10 @@ def assigned_issues():
if not task:
continue
tasks_actioned.append(task["id"])
if assigned_issue == "closed" and not is_task_completed(task):
if assigned_issue.state == "closed" and not is_task_completed(task):
print("completing", assigned_issue)
task.complete()
if is_task_completed(task):
elif assigned_issue.state == "open" and is_task_completed(task):
print("uncompleting task", assigned_issue)
task.uncomplete()
if task["content"] != issue_to_task_name(assigned_issue):