X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/blobdiff_plain/e0e960a40f15f3cfa7752c33fadb8d6fb2502591..d06c7ada569cc7566c28dd48f9438849b2a88f8c:/pirate_add_shift_recurrence.py diff --git a/pirate_add_shift_recurrence.py b/pirate_add_shift_recurrence.py index 88c0fec..0266fc5 100644 --- a/pirate_add_shift_recurrence.py +++ b/pirate_add_shift_recurrence.py @@ -2,7 +2,7 @@ import sys import os -from tasklib.task import TaskWarrior +from tasklib import TaskWarrior time_attributes = ('wait', 'scheduled') @@ -18,10 +18,11 @@ def is_new_local_recurrence_child_task(task): return True tw = TaskWarrior(data_location=os.path.dirname(os.path.dirname(sys.argv[0]))) +tw.overrides.update(dict(recurrence="no", hooks="no")) def hook_shift_recurrence(task): if is_new_local_recurrence_child_task(task): - parent = tw.tasks.get(uuid=task['parent']) + parent = tw.tasks.get(uuid=task['parent']['uuid']) parent_due_shift = task['due'] - parent['due'] for attr in time_attributes: if parent[attr]: