Vimwiki: Warn about stale UUIDs and replace them

This commit is contained in:
Tomas Babej 2014-12-31 03:28:56 +01:00
parent 832dfa40b7
commit 241e4c5fdc

View file

@ -110,6 +110,10 @@ class VimwikiTask(object):
self.task = tw.tasks.get(uuid=self.uuid)
except Task.DoesNotExist:
self.task = Task(tw)
# If task cannot be loaded, we need to remove the UUID
vim.command('echom UUID not found:"%s",'
'will be replaced if saved' % self.uuid)
self.uuid = None
else:
self.task = Task(tw)