VimwikiTask: Save task only if it differs from TW representation

This commit is contained in:
Tomas Babej 2014-12-29 10:11:55 +01:00
parent 24936aee5f
commit 837e4d87e7

View file

@ -122,9 +122,14 @@ class VimwikiTask(object):
def save_to_tw(self):
# Push the values to the Task
self.task['description'] = self.text
self.task.save()
# Push the values to the Task only if the Vimwiki representation
# somehow differs
# TODO: Check more than description
if self.task['description'] != self.text:
self.task['description'] = self.text
self.task['depends'] |= set(s.task for s in self.add_dependencies
if not s.task.completed)
self.task.save()
# Load the UUID
self.task.refresh()