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

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
This commit is contained in:
Afshan 2020-08-17 10:51:53 +05:30 committed by GitHub
parent e9b229c246
commit 5b45961b9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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]