diff --git a/frappe/desk/doctype/notification_settings/notification_settings.py b/frappe/desk/doctype/notification_settings/notification_settings.py index 1436ecc1cd..2bf7347a4f 100644 --- a/frappe/desk/doctype/notification_settings/notification_settings.py +++ b/frappe/desk/doctype/notification_settings/notification_settings.py @@ -52,6 +52,7 @@ def toggle_notifications(user: str, enable: bool = False): try: settings = frappe.get_doc("Notification Settings", user) except frappe.DoesNotExistError: + frappe.clear_last_message() return if settings.enabled != enable: