Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit fa757f3

Browse files
committed
Only tag non-completed tasks in serial lists, resolves #1
1 parent 52ad1ea commit fa757f3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

nextaction.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,11 @@ def remove_label(item, label):
142142
if item_type or len(child_items) > 0:
143143
# Process serial tagged items
144144
if item_type == 'serial':
145-
for idx, child_item in enumerate(child_items):
146-
if idx == 0:
145+
for child_item in child_items:
146+
first_found = False
147+
if child_item['checked'] == 0 and not first_found:
147148
add_label(child_item, label_id)
149+
first_found = True
148150
else:
149151
remove_label(child_item, label_id)
150152
# Process parallel tagged items or untagged parents

0 commit comments

Comments
 (0)