mirror of
https://github.com/ankitects/anki.git
synced 2025-11-08 21:57:12 -05:00
when deleting a group, update cards and facts too
This commit is contained in:
parent
673913a2a8
commit
86a7106eab
1 changed files with 3 additions and 1 deletions
|
|
@ -571,7 +571,9 @@ update facts set tags = :t, mod = :n where id = :id""", [fix(row) for row in res
|
||||||
return id
|
return id
|
||||||
|
|
||||||
def delGroup(self, gid):
|
def delGroup(self, gid):
|
||||||
self.db.scalar("delete from groups where id = ?", gid)
|
self.db.execute("update cards set gid = 1 where gid = ?", gid)
|
||||||
|
self.db.execute("update facts set gid = 1 where gid = ?", gid)
|
||||||
|
self.db.execute("delete from groups where id = ?", gid)
|
||||||
|
|
||||||
def setGroup(self, cids, gid):
|
def setGroup(self, cids, gid):
|
||||||
self.db.execute(
|
self.db.execute(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue