todoist_interface/todoist_interface/utils.py

14 lines
424 B
Python
Raw Normal View History

2021-11-06 20:07:57 +01:00
def get_missing_tasks(tasks, issues_to_check):
"""
Check if tasks exists in tasks_to_check
:param tasks: list of tasks
:param issues_to_check: list of issues to check
:return: A list of tasks not in Todoist
"""
missing_tasks = []
for issue in issues_to_check:
2021-11-06 21:27:27 +01:00
if issue["content"] not in [t["content"] for t in tasks]:
missing_tasks.append(issue)
2021-11-06 20:07:57 +01:00
return missing_tasks