fix: Avoid unnecessary "Not Found" error message

This commit is contained in:
Suraj Shetty 2022-06-08 09:54:30 +05:30
parent 0c28820bcc
commit fca0853ebd

View file

@ -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: