taskwiki: Make sure space-separated uuids are not passed as single

argument
This commit is contained in:
Tomas Babej 2015-08-07 06:42:02 +02:00
parent e3ef5de16d
commit 2d7624e491
2 changed files with 5 additions and 3 deletions

View file

@ -178,7 +178,9 @@ class TaskCache(object):
continue
# Get them out of TaskWarrior at once
tasks = tw.tasks.filter(uuid=' '.join(uuids))
tasks = tw.tasks.filter()
for uuid in uuids:
tasks.filter(uuid=uuid)
# Update each task in the cache
for task in tasks:

View file

@ -141,13 +141,13 @@ class SelectedTasks(object):
# We might have two same tasks in the range, make sure we do not pass the
# same uuid twice
unique_tasks = set(vimwikitask.task['uuid'] for vimwikitask in self.tasks)
uuids = ' '.join(unique_tasks)
uuids = list(unique_tasks)
# Generate the arguments from the modstring
args = util.tw_modstring_to_args(modstring)
# Modify all tasks at once
output = util.tw_execute_safely(self.tw, [uuids, 'mod'] + args)
output = util.tw_execute_safely(self.tw, uuids + ['mod'] + args)
# Update the touched tasks in buffer, if needed
cache.load_tasks()