chore: add standard queries hooks to whitelist (#21939)

standard queries are used within the search widget, and now require to
be whitelisted before they can be executed through the search widget.

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

Co-authored-by: sahil28297 <37302950+sahil28297@users.noreply.github.com>
This commit is contained in:
Chinmay Pai 2020-06-18 11:58:54 +05:30 committed by GitHub
parent 8db89bfab6
commit 96100e9507
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -70,6 +70,7 @@ def validate_service_item(item, msg):
if frappe.db.get_value('Item', item, 'is_stock_item'):
frappe.throw(_(msg))
@frappe.whitelist()
def get_practitioner_list(doctype, txt, searchfield, start, page_len, filters=None):
fields = ['name', 'practitioner_name', 'mobile_phone']

View File

@ -339,6 +339,7 @@ def get_loyalty_programs(doc):
return lp_details
@frappe.whitelist()
def get_customer_list(doctype, txt, searchfield, start, page_len, filters=None):
from erpnext.controllers.queries import get_fields