diff --git a/helpdesk/api/doc.py b/helpdesk/api/doc.py index 5a5c4b92d..9369dd91c 100644 --- a/helpdesk/api/doc.py +++ b/helpdesk/api/doc.py @@ -68,6 +68,7 @@ def get_filterable_fields(doctype: str, show_customer_portal_fields=False): ) # for customer portal show only fields present in customer_portal_fields + if show_customer_portal_fields: from_doc_fields = from_doc_fields.where( QBDocField.fieldname.isin(customer_portal_fields) @@ -76,10 +77,8 @@ def get_filterable_fields(doctype: str, show_customer_portal_fields=False): QBCustomField.fieldname.isin(visible_custom_fields) ) - from_doc_fields = from_doc_fields.run(as_dict=True) from_custom_fields = from_custom_fields.run(as_dict=True) - # from hd ticket template get children with fieldname and hidden_from_customer @@ -263,9 +262,10 @@ def get_customer_portal_fields(doctype, fields): fields = [field for field in fields if field.get("value") in customer_portal_fields] return fields + def get_visible_custom_fields(): return frappe.db.get_all( "HD Ticket Template Field", {"parent": "Default", "hide_from_customer": 0}, pluck="fieldname", - ) \ No newline at end of file + )