From 84af03fe841e6d650370da2601d0537cfe24b21e Mon Sep 17 00:00:00 2001 From: RitvikSardana Date: Wed, 18 Dec 2024 13:01:17 +0530 Subject: [PATCH] chore: rename function --- helpdesk/helpdesk/doctype/hd_ticket/hd_ticket.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/helpdesk/helpdesk/doctype/hd_ticket/hd_ticket.py b/helpdesk/helpdesk/doctype/hd_ticket/hd_ticket.py index 2fce9c13e..cf90d4cb3 100644 --- a/helpdesk/helpdesk/doctype/hd_ticket/hd_ticket.py +++ b/helpdesk/helpdesk/doctype/hd_ticket/hd_ticket.py @@ -571,7 +571,7 @@ def reply_via_agent( file_doc.attached_to_name = communication.name file_doc.attached_to_doctype = "Communication" file_doc.save(ignore_permissions=True) - self.attach_ticket_with_file(file_doc.file_url) + self.attach_file_with_ticket(file_doc.file_url) _attachments.append({"file_url": file_doc.file_url}) @@ -653,7 +653,7 @@ def create_communication_via_contact(self, message, attachments=[]): "File", filters={"attached_to_name": c.name}, pluck="file_url" ) for url in file_urls: - self.attach_ticket_with_file(url) + self.attach_file_with_ticket(url) @frappe.whitelist() def mark_seen(self): @@ -760,7 +760,7 @@ def on_communication_update(self, c): # Save the ticket, allowing for hooks to run. self.save() - def attach_ticket_with_file(self, file_url): + def attach_file_with_ticket(self, file_url): file_doc = frappe.new_doc("File") file_doc.attached_to_name = self.name file_doc.attached_to_doctype = "HD Ticket"