From 75ae0fa2483688a2417f5ec4df3ccf2b96220312 Mon Sep 17 00:00:00 2001 From: Ritwik Puri Date: Tue, 17 Jan 2023 10:50:07 +0530 Subject: [PATCH] chore: remove unnecessary query condition from get_other_system_managers (#19611) --- frappe/core/doctype/user/user.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/frappe/core/doctype/user/user.py b/frappe/core/doctype/user/user.py index 7ba35f51810d..a7e5cf7669fe 100644 --- a/frappe/core/doctype/user/user.py +++ b/frappe/core/doctype/user/user.py @@ -305,12 +305,10 @@ def get_other_system_managers(self): .from_(user_role_doctype) .select(user_doctype.name) .where(user_role_doctype.role == "System Manager") - .where(user_doctype.docstatus < 2) .where(user_doctype.enabled == 1) .where(user_role_doctype.parent == user_doctype.name) .where(user_role_doctype.parent.notin(["Administrator", self.name])) .limit(1) - .distinct() ).run() def get_fullname(self):