fix: the JSON object must be str, bytes or bytearray, not "list" (#23053)

This commit is contained in:
Afshan
2020-08-17 12:25:34 +05:30
committed by GitHub
parent 5e51a1fe9b
commit 4b6d5ef6aa

View File

@@ -27,4 +27,4 @@ def get_vouchar_detials(column_list, doctype, docname):
for col in column_list:
sanitize_searchfield(col)
return frappe.db.sql(''' select {columns} from `tab{doctype}` where name=%s'''
.format(columns=", ".join(json.loads(column_list)), doctype=doctype), docname, as_dict=1)[0]
.format(columns=", ".join(column_list), doctype=doctype), docname, as_dict=1)[0]