Skip to content

Commit

Permalink
chore(linters): format doc.py file
Browse files Browse the repository at this point in the history
  • Loading branch information
RitvikSardana committed Oct 14, 2024
1 parent 88460d1 commit df7d76a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions helpdesk/api/doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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

Expand Down Expand Up @@ -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",
)
)

0 comments on commit df7d76a

Please sign in to comment.