mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
try to recover tags of card, too
This commit is contained in:
parent
1b219679b6
commit
6860f64f28
1 changed files with 3 additions and 0 deletions
|
@ -3246,6 +3246,9 @@ where id in %s""" % ids2str(ids)):
|
||||||
f = self.newFact()
|
f = self.newFact()
|
||||||
f['Question'] = repl(q)
|
f['Question'] = repl(q)
|
||||||
f['Answer'] = repl(a)
|
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)
|
cards = self.addFact(f)
|
||||||
# delete the freshly created card and point old card to this fact
|
# delete the freshly created card and point old card to this fact
|
||||||
self.s.statement("delete from cards where id = :id",
|
self.s.statement("delete from cards where id = :id",
|
||||||
|
|
Loading…
Reference in a new issue