chore: remove unnecessary query condition from get_other_system_managers (#19611)

This commit is contained in:
Ritwik Puri 2023-01-17 10:50:07 +05:30 committed by GitHub
parent 433115f62d
commit 75ae0fa248
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -305,12 +305,10 @@ class User(Document):
.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):