show correct card count when removing multiple templates

https://forums.ankiweb.net/t/error-in-card-type-deletion/10868
This commit is contained in:
Damien Elmes 2021-06-17 15:51:21 +10:00
parent b26e125cbd
commit d0ca61a608

View File

@ -550,7 +550,8 @@ class CardLayout(QDialog):
return
def get_count() -> int:
return self.mm.template_use_count(self.model["id"], self.ord)
ord = self.current_template()["ord"]
return self.mm.template_use_count(self.model["id"], ord)
def on_done(fut: Future) -> None:
card_cnt = fut.result()