diff --git a/frappe/database/operator_map.py b/frappe/database/operator_map.py index c8cb9aa099..218983a318 100644 --- a/frappe/database/operator_map.py +++ b/frappe/database/operator_map.py @@ -8,7 +8,6 @@ import frappe from frappe.database.utils import NestedSetHierarchy from frappe.model.db_query import get_timespan_date_range from frappe.query_builder import Field -from frappe.query_builder.functions import Coalesce from frappe.utils import cstr @@ -51,7 +50,7 @@ def func_in(key: Field, value: list | tuple) -> frappe.qb: value = ["" if v is None else v for v in value] if "" in value: - return Coalesce(key, "").isin(value) + return key.isin(value) | key.isnull() return key.isin(value) diff --git a/frappe/public/js/frappe/ui/notifications/notifications.js b/frappe/public/js/frappe/ui/notifications/notifications.js index b76ecff96e..fc68a501aa 100644 --- a/frappe/public/js/frappe/ui/notifications/notifications.js +++ b/frappe/public/js/frappe/ui/notifications/notifications.js @@ -34,7 +34,6 @@ frappe.ui.Notifications = class Notifications { `) .on("click", (e) => { e.stopImmediatePropagation(); - console.log("what"); frappe.set_route("Form", "Notification Settings", frappe.session.user); }) .appendTo(this.header_actions) @@ -247,15 +246,13 @@ class NotificationsView extends BaseNotificationsView { .tooltip({ delay: { show: 600, hide: 100 }, trigger: "hover" }); this.setup_notification_listeners(); - this.get_notifications_list(this.max_length).then((r) => { - if (!r.message) return; - this.dropdown_items = r.message.notification_logs; - frappe.update_user_info(r.message.user_info); - this.render_notifications_dropdown(); - if (this.settings.seen == 0 && this.dropdown_items.length > 0) { - this.toggle_notification_icon(false); - } - }); + + this.dropdown_items = []; + this.notifications_fetched = false; + + if (this.settings && this.settings.seen == 0) { + this.toggle_notification_icon(false); + } } update_dropdown() { @@ -370,7 +367,7 @@ class NotificationsView extends BaseNotificationsView {