mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 09:16:38 -04:00
if no tags were provided, just return
This commit is contained in:
parent
d611299715
commit
89673f0c0a
1 changed files with 2 additions and 0 deletions
|
@ -529,6 +529,8 @@ insert or ignore into tags (mod, name) values (%d, :t)""" % intTime(),
|
|||
def addTags(self, ids, tags, add=True):
|
||||
"Add tags in bulk. TAGS is space-separated."
|
||||
newTags = parseTags(tags)
|
||||
if not newTags:
|
||||
return
|
||||
# cache tag names
|
||||
self.registerTags(newTags)
|
||||
# find facts missing the tags
|
||||
|
|
Loading…
Reference in a new issue