From 9f183e6cf2d709457e371674b7a38661644a6dfd Mon Sep 17 00:00:00 2001 From: saxenabhishek Date: Tue, 30 Nov 2021 14:16:13 +0530 Subject: [PATCH] style: follow simple indenting standard --- frappe/core/doctype/user/user.py | 6 +++++- frappe/core/notifications.py | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/frappe/core/doctype/user/user.py b/frappe/core/doctype/user/user.py index 9561dcb737..f36553593b 100644 --- a/frappe/core/doctype/user/user.py +++ b/frappe/core/doctype/user/user.py @@ -364,7 +364,11 @@ class User(Document): # delete todos frappe.db.delete("ToDo", {"owner": self.name}) todo_table = DocType("ToDo") - frappe.qb.update(todo_table).set(todo_table.assigned_by, None).where(todo_table.assigned_by == self.name).run() + ( + frappe.qb.update(todo_table) + .set(todo_table.assigned_by, None) + .where(todo_table.assigned_by == self.name) + ).run() # delete events frappe.db.delete("Event", {"owner": self.name, "event_type": "Private"}) diff --git a/frappe/core/notifications.py b/frappe/core/notifications.py index d091983d00..a69c644383 100644 --- a/frappe/core/notifications.py +++ b/frappe/core/notifications.py @@ -61,7 +61,12 @@ def get_unread_emails(): communication_doctype = DocType("Communication") user_doctype = DocType("User") - distinct_email_accounts = frappe.qb.from_(user_doctype).select(user_doctype.email_account).where(user_doctype.parent == frappe.session.user).distinct() + distinct_email_accounts = ( + frappe.qb.from_(user_doctype) + .select(user_doctype.email_account) + .where(user_doctype.parent == frappe.session.user) + .distinct() + ) return frappe.db.count(communication_doctype, filters=( (communication_doctype.communication_type == "Communication")