Merge pull request #764 from anandpdoshi/anand-august-11
[fix] Enclose add_fetch fields in '`'
This commit is contained in:
commit
9c2a2e28b4
1 changed files with 3 additions and 0 deletions
|
|
@ -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]]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue