Skip to content

Commit

Permalink
Get the DirectDB method to delete values correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphbean committed Dec 9, 2014
1 parent 4c579ce commit cc1d78a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions taskw/warrior.py
Expand Up @@ -328,6 +328,14 @@ def task_update(self, task):
if 'id' in task:
del task['id']

# Delete None values (treat them as deleting values)
# https://github.com/ralphbean/taskw/pull/70
for k, v in task.items():
if v is None:
task.pop(k)
if k in _task:
_task.pop(k)

_task.update(task)
self._task_replace(line, Status.to_file(task['status']), _task)
return line, _task
Expand Down

0 comments on commit cc1d78a

Please sign in to comment.