mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-11 16:13:15 +02:00
fix: resolve user permission error on status change by updating user enabled status directly
(cherry picked from commit c6695b613c)
This commit is contained in:
committed by
Mergify
parent
7c34cb1134
commit
c761c77e4a
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user