mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
catch attempt to delete last template
This commit is contained in:
parent
4b3e1f0d2b
commit
c2df347909
1 changed files with 1 additions and 0 deletions
|
@ -310,6 +310,7 @@ select id from cards where nid in (select id from notes where mid = ?)""",
|
|||
|
||||
def remTemplate(self, m, template):
|
||||
"False if removing template would leave orphan notes."
|
||||
assert len(m['tmpls']) > 1
|
||||
# find cards using this template
|
||||
ord = m['tmpls'].index(template)
|
||||
cids = self.col.db.list("""
|
||||
|
|
Loading…
Reference in a new issue