if no tags were provided, just return

This commit is contained in:
Damien Elmes 2011-04-13 04:00:48 +09:00
parent d611299715
commit 89673f0c0a

View file

@ -529,6 +529,8 @@ insert or ignore into tags (mod, name) values (%d, :t)""" % intTime(),
def addTags(self, ids, tags, add=True): def addTags(self, ids, tags, add=True):
"Add tags in bulk. TAGS is space-separated." "Add tags in bulk. TAGS is space-separated."
newTags = parseTags(tags) newTags = parseTags(tags)
if not newTags:
return
# cache tag names # cache tag names
self.registerTags(newTags) self.registerTags(newTags)
# find facts missing the tags # find facts missing the tags