fix: resolve user permission error on status change by updating user … (backport #54033) (#54060)

Co-authored-by: Krishna Shirsath <shirsathkrishna19@gmail.com>
This commit is contained in:
mergify[bot]
2026-04-07 10:25:13 +05:30
committed by GitHub
parent e6722c84fa
commit 62b83cacce

View File

@@ -301,7 +301,7 @@ class Employee(NestedSet):
frappe.throw(_("User {0} does not exist").format(self.user_id))
if self.status != "Active" and enabled or self.status == "Active" and enabled == 0:
frappe.set_value("User", self.user_id, "enabled", not enabled)
frappe.db.set_value("User", self.user_id, "enabled", not enabled)
def validate_duplicate_user_id(self):
Employee = frappe.qb.DocType("Employee")