fix(copy_doc): don't copy password fields

* this leads to surprises!
This commit is contained in:
Hussain Nagaria 2024-12-31 22:23:29 +05:30
parent 87a4c03850
commit 1997c7ebac

View file

@ -294,7 +294,8 @@ $.extend(frappe.model, {
df &&
key.substr(0, 2) != "__" &&
!no_copy_list.includes(key) &&
!(df && !from_amend && cint(df.no_copy) == 1)
!(df && !from_amend && cint(df.no_copy) == 1) &&
df.fieldtype !== "Password"
) {
var value = doc[key] || [];
if (frappe.model.table_fields.includes(df.fieldtype)) {