fix: parameterize link name when clearing timeline references
link_name could potentially include an apostrophe and cause: `"mysql.err.ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax"` Adjusted the query to parameterize it
This commit is contained in:
parent
d9a1bfadc8
commit
2c16a86e86
1 changed files with 1 additions and 1 deletions
|
|
@ -333,7 +333,7 @@ def clear_references(doctype, reference_doctype, reference_name,
|
|||
|
||||
def clear_timeline_references(link_doctype, link_name):
|
||||
frappe.db.sql("""delete from `tabCommunication Link`
|
||||
where `tabCommunication Link`.link_doctype='{0}' and `tabCommunication Link`.link_name='{1}'""".format(link_doctype, link_name)) # nosec
|
||||
where `tabCommunication Link`.link_doctype='{0}' and `tabCommunication Link`.link_name=%s""".format(link_doctype), (link_name)) # nosec
|
||||
|
||||
def insert_feed(doc):
|
||||
from frappe.utils import get_fullname
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue