Fix for task delete

- `task delete` does add 'end' to modified JSON but not remove key 'start'
- Stop time tracking when task is deleted

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
This commit is contained in:
Thomas Lauf 2019-08-21 21:06:57 +02:00
parent 2504493de6
commit 38ddeec03c

View file

@ -67,7 +67,7 @@ if 'start' in new and 'start' not in old:
start_or_stop = 'start'
# Stopped task.
elif 'start' not in new and 'start' in old:
elif ('start' not in new or 'end' in new) and 'start' in old:
start_or_stop = 'stop'
if start_or_stop: