try to recover tags of card, too

This commit is contained in:
Damien Elmes 2010-12-17 02:03:35 +09:00
parent 1b219679b6
commit 6860f64f28

View file

@ -3246,6 +3246,9 @@ where id in %s""" % ids2str(ids)):
f = self.newFact()
f['Question'] = repl(q)
f['Answer'] = repl(a)
f.tags = self.s.scalar("""
select group_concat(tag, " ") from tags t, cardTags ct
where cardId = :cid and ct.tagId = t.id""", cid=id) or u""
cards = self.addFact(f)
# delete the freshly created card and point old card to this fact
self.s.statement("delete from cards where id = :id",