fix: proper quoting in sql queries

This commit is contained in:
Ankush Menat 2022-04-24 20:05:36 +05:30
parent 7e555d3d8c
commit a90e7e32a4

View File

@ -881,11 +881,11 @@ def get_default_contact(doctype, name):
"""
SELECT dl.parent, c.is_primary_contact, c.is_billing_contact
FROM `tabDynamic Link` dl
INNER JOIN tabContact c ON c.name = dl.parent
INNER JOIN `tabContact` c ON c.name = dl.parent
WHERE
dl.link_doctype=%s AND
dl.link_name=%s AND
dl.parenttype = "Contact"
dl.parenttype = 'Contact'
ORDER BY is_primary_contact DESC, is_billing_contact DESC
""",
(doctype, name),