diff --git a/frappe/core/doctype/comment/comment.py b/frappe/core/doctype/comment/comment.py index e32704aba4..62e4aefe0d 100644 --- a/frappe/core/doctype/comment/comment.py +++ b/frappe/core/doctype/comment/comment.py @@ -9,8 +9,7 @@ import json from frappe.model.document import Document from frappe.core.doctype.user.user import extract_mentions from frappe.core.doctype.notification_log.notification_log import create_notification_log -from frappe.core.doctype.notification_settings.notification_settings import (is_notifications_enabled, - is_email_notifications_enabled) +from frappe.core.doctype.notification_settings.notification_settings import is_email_notifications_enabled from frappe.utils import get_fullname, get_link_to_form from frappe.website.render import clear_cache from frappe.database.schema import add_column diff --git a/frappe/core/doctype/communication/communication.py b/frappe/core/doctype/communication/communication.py index 5f091c8730..78e63ed1cd 100644 --- a/frappe/core/doctype/communication/communication.py +++ b/frappe/core/doctype/communication/communication.py @@ -9,8 +9,6 @@ from frappe.utils import validate_email_address, get_fullname, strip_html, cstr from frappe.core.doctype.communication.email import (validate_email, notify, _notify, update_parent_mins_to_first_response) from frappe.core.doctype.notification_log.notification_log import create_notification_log -from frappe.core.doctype.notification_settings.notification_settings import (is_notifications_enabled, - is_email_notifications_enabled, is_energy_point_notifications_enabled) from frappe.core.utils import get_parent_doc from frappe.utils.bot import BotReply from frappe.utils import parse_addr diff --git a/frappe/core/doctype/notification_log/notification_log.py b/frappe/core/doctype/notification_log/notification_log.py index f924c8403d..fa39c6cbfa 100644 --- a/frappe/core/doctype/notification_log/notification_log.py +++ b/frappe/core/doctype/notification_log/notification_log.py @@ -6,7 +6,7 @@ from __future__ import unicode_literals import frappe from frappe.model.document import Document from frappe.core.doctype.notification_settings.notification_settings import (is_notifications_enabled, - is_email_notifications_enabled, is_energy_point_notifications_enabled) + is_energy_point_notifications_enabled) class NotificationLog(Document): diff --git a/frappe/core/doctype/notification_settings/notification_settings.py b/frappe/core/doctype/notification_settings/notification_settings.py index 4d856ec341..6f9a034200 100644 --- a/frappe/core/doctype/notification_settings/notification_settings.py +++ b/frappe/core/doctype/notification_settings/notification_settings.py @@ -43,7 +43,7 @@ def get_subscribed_documents(): name = settings[0].name doc = frappe.get_doc('Notification Settings', name) subscribed_documents = [item.document for item in doc.subscribed_documents] - + return subscribed_documents diff --git a/frappe/desk/notifications.py b/frappe/desk/notifications.py index cbebd6bbd6..17c2985192 100644 --- a/frappe/desk/notifications.py +++ b/frappe/desk/notifications.py @@ -4,9 +4,8 @@ from __future__ import unicode_literals import frappe -from frappe.utils import time_diff_in_seconds, now, now_datetime, DATETIME_FORMAT +from frappe.utils import time_diff_in_seconds, now from frappe.core.doctype.notification_settings.notification_settings import get_subscribed_documents -from dateutil.relativedelta import relativedelta from six import string_types import json diff --git a/frappe/public/js/frappe/ui/notifications/notifications.js b/frappe/public/js/frappe/ui/notifications/notifications.js index a643c7a53f..412013cba5 100644 --- a/frappe/public/js/frappe/ui/notifications/notifications.js +++ b/frappe/public/js/frappe/ui/notifications/notifications.js @@ -93,7 +93,7 @@ frappe.ui.Notifications = class Notifications { this.$open_docs.html(''); let defaults = ['ToDo']; this.get_counts(this.open_document_list['open_count_doctype'], 1, defaults); - let targets = { doctypes : {} }, map = this.open_document_list['targets']; + let targets = { doctypes: {} }, map = this.open_document_list['targets']; Object.keys(map).map(doctype => { Object.keys(map[doctype]).map(doc => { @@ -286,7 +286,7 @@ frappe.ui.Notifications = class Notifications { if (category_id !== 'notifications') { html += `