Check allow_edit before preparing web form
This commit is contained in:
parent
4b462bfd8a
commit
45ec5d47a3
1 changed files with 1 additions and 1 deletions
|
|
@ -58,7 +58,7 @@ frappe.ready(function() {
|
|||
}
|
||||
}
|
||||
let doc = r.message.doc || build_doc(r.message);
|
||||
web_form.prepare(web_form_doc, doc);
|
||||
web_form.prepare(web_form_doc, r.message.doc && web_form_doc.allow_edit === 1 ? r.message.doc : {});
|
||||
web_form.make();
|
||||
web_form.set_default_values();
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue