style: follow simple indenting standard

This commit is contained in:
saxenabhishek 2021-11-30 14:16:13 +05:30
parent 1bb8dcf176
commit 9f183e6cf2
2 changed files with 11 additions and 2 deletions

View file

@ -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"})

View file

@ -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")