mirror of
https://github.com/frappe/erpnext.git
synced 2026-10-29 22:57:42 +00:00
fix(setup): let HR users set the image of an employee linked to a user
Saving an employee with a new image attaches the image to the linked
User. That File insert checked write permission on User, which HR
users do not have.
(cherry picked from commit 70eaef1ce3)
This commit is contained in:
@@ -149,7 +149,7 @@ class Employee(NestedSet):
|
||||
"attached_to_doctype": "User",
|
||||
"attached_to_name": self.user_id,
|
||||
}
|
||||
).insert(ignore_if_duplicate=True)
|
||||
).insert(ignore_permissions=True, ignore_if_duplicate=True)
|
||||
except frappe.DuplicateEntryError:
|
||||
# already exists
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user