Skip to content

Commit

Permalink
Merge pull request #41 from coddingtonbear/manually_assign_uuid_to_ad…
Browse files Browse the repository at this point in the history
…ded_tasks

Manually assign UUID of task before creation to ensure that retrieval is...
  • Loading branch information
ralphbean committed Feb 22, 2014
2 parents 1a5c0d4 + 782e9f6 commit d1afcbd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion taskw/warrior.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,11 +553,12 @@ def task_add(self, description, tags=None, **kw):
# task and add them after we've added the task.
annotations = self._extract_annotations_from_task(task)

task['uuid'] = str(uuid.uuid4())
stdout, stderr = self._execute(
'add',
taskw.utils.encode_task_experimental(task),
)
id, added_task = self.get_task(description=task['description'])
id, added_task = self.get_task(uuid=task['uuid'])

# Check if 'uuid' is in the task we just added.
if not 'uuid' in added_task:
Expand Down

0 comments on commit d1afcbd

Please sign in to comment.