From fca0853ebd4827b4bb6d462fe2229ea0f277e61a Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Wed, 8 Jun 2022 09:54:30 +0530 Subject: [PATCH] fix: Avoid unnecessary "Not Found" error message --- .../desk/doctype/notification_settings/notification_settings.py | 1 + 1 file changed, 1 insertion(+) 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: