mirror of
https://github.com/tbabej/taskwiki.git
synced 2025-08-24 14:46:42 +02:00
VimwikiTask: Save task only if it differs from TW representation
This commit is contained in:
parent
24936aee5f
commit
837e4d87e7
1 changed files with 8 additions and 3 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue