diff --git a/frappe/widgets/form/utils.py b/frappe/widgets/form/utils.py index 608ace7361..faccf33291 100644 --- a/frappe/widgets/form/utils.py +++ b/frappe/widgets/form/utils.py @@ -48,6 +48,9 @@ def validate_link(): # get fetch values if fetch: + # escape with "`" + fetch = ", ".join(("`{0}`".format(f.strip()) for f in fetch.split(","))) + frappe.response['fetch_values'] = [frappe.utils.parse_val(c) \ for c in frappe.db.sql("select %s from `tab%s` where name=%s" \ % (fetch, options, '%s'), (value,))[0]]