fix: show empty fields in web form's view mode

This commit is contained in:
Shariq Ansari 2022-08-17 18:33:59 +05:30
parent b3b773dcae
commit fec57546ee
2 changed files with 2 additions and 2 deletions

View file

@ -82,7 +82,7 @@ frappe.ui.form.Control = class BaseControl {
is_null(value) &&
!in_list(["HTML", "Image", "Button"], this.df.fieldtype)
)
status = "None";
status = "Read";
return status;
}

View file

@ -489,7 +489,7 @@ def accept(web_form, data, docname=None):
for field in web_form.web_form_fields:
fieldname = field.fieldname
df = meta.get_field(fieldname)
value = data.get(fieldname, None)
value = data.get(fieldname, "")
if df and df.fieldtype in ("Attach", "Attach Image"):
if value and "data:" and "base64" in value: