Handle failure in CardLayout/accept()

This commit is contained in:
RumovZ 2021-05-25 20:58:43 +02:00
parent e9309c5378
commit db9594818a

View File

@ -30,6 +30,7 @@ from aqt.utils import (
saveSplitter,
shortcut,
showInfo,
showWarning,
tooltip,
tr,
)
@ -791,7 +792,7 @@ class CardLayout(QDialog):
update_notetype_legacy(parent=self.mw, notetype=self.model).success(
on_done
).run_in_background()
).failure(lambda e: showWarning(str(e))).run_in_background()
def reject(self) -> None:
if self.change_tracker.changed():