fix: set docname if multiple entries are not allowed
This commit is contained in:
parent
cb7bc9a70a
commit
24dcd83fb3
1 changed files with 3 additions and 0 deletions
|
|
@ -544,6 +544,9 @@ def get_form_data(doctype, docname=None, web_form_name=None):
|
|||
out = frappe._dict()
|
||||
out.web_form = web_form
|
||||
|
||||
if frappe.session.user != 'Guest' and not docname and not web_form.allow_multiple:
|
||||
docname = frappe.db.get_value(doctype, {"owner": frappe.session.user}, "name")
|
||||
|
||||
if docname:
|
||||
doc = frappe.get_doc(doctype, docname)
|
||||
if has_web_form_permission(doctype, docname, ptype='read'):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue