mirror of
https://github.com/tbabej/taskwiki.git
synced 2025-08-23 02:23:07 +02:00
VimwikiTask: Create empty Task object in __init__, not at save time
This commit is contained in:
parent
a1fdd9f4d3
commit
b32dc605f8
1 changed files with 6 additions and 5 deletions
|
@ -103,14 +103,15 @@ class VimwikiTask(object):
|
|||
if self.uuid:
|
||||
try:
|
||||
self.task = tw.tasks.get(uuid=self.uuid)
|
||||
except tasklib.task.DoesNotExist:
|
||||
pass
|
||||
except Task.DoesNotExist:
|
||||
self.task = Task(tw)
|
||||
else:
|
||||
self.task = Task(tw)
|
||||
|
||||
|
||||
self.parent = self.find_parent_task()
|
||||
|
||||
def save_to_tw(self):
|
||||
if not self.task:
|
||||
self.task = Task(tw)
|
||||
|
||||
# Push the values to the Task
|
||||
self.task['description'] = self.text
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue