catch attempt to delete last template

This commit is contained in:
Damien Elmes 2012-04-20 22:37:31 +09:00
parent 4b3e1f0d2b
commit c2df347909

View file

@ -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("""