mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 11:49:10 +00:00
Merge pull request #54033 from krishna-254/fix-user-permission-error-on-status-change
fix: resolve user permission error on status change by updating user …
This commit is contained in:
@@ -301,7 +301,7 @@ class Employee(NestedSet):
|
|||||||
frappe.throw(_("User {0} does not exist").format(self.user_id))
|
frappe.throw(_("User {0} does not exist").format(self.user_id))
|
||||||
|
|
||||||
if self.status != "Active" and enabled or self.status == "Active" and enabled == 0:
|
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):
|
def validate_duplicate_user_id(self):
|
||||||
Employee = frappe.qb.DocType("Employee")
|
Employee = frappe.qb.DocType("Employee")
|
||||||
|
|||||||
Reference in New Issue
Block a user