From a10646476434dea0035b500de48b2c9404972974 Mon Sep 17 00:00:00 2001 From: Hoffelhas Date: Wed, 13 May 2020 17:07:20 +0200 Subject: [PATCH] Update autodoist.py Fixed bug in which checked children were still processed in the sequential loop --- autodoist.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/autodoist.py b/autodoist.py index 61aaa49..f480a7e 100644 --- a/autodoist.py +++ b/autodoist.py @@ -169,8 +169,9 @@ def main(): for item in items: - # Check for child_items - child_items = list(filter(lambda x: x['parent_id'] == item['id'], items)) + # Determine which child_items exist that have not been checked yet + non_checked_items = list(filter(lambda x: x['checked'] == 0, items)) + child_items = list(filter(lambda x: x['parent_id'] == item['id'], non_checked_items)) if not args.recurring: try: