From 14dac24e812076534f8ddbcdd591626d6bd0b311 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 16 Nov 2012 12:07:12 +0530 Subject: [PATCH] email/receive, support ticket fix --- support/doctype/support_ticket/__init__.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/support/doctype/support_ticket/__init__.py b/support/doctype/support_ticket/__init__.py index 6f3c589ae4..c0ab9eb02e 100644 --- a/support/doctype/support_ticket/__init__.py +++ b/support/doctype/support_ticket/__init__.py @@ -90,10 +90,8 @@ class SupportMailbox(POP3Mailbox): st.doc.save() update_feed(st.doc, 'on_update') - webnotes.conn.commit() # extract attachments self.save_attachments(st.doc, mail.attachments) - webnotes.conn.begin() return from webnotes.model.doctype import get_property @@ -124,10 +122,8 @@ class SupportMailbox(POP3Mailbox): if "MAILER-DAEMON" not in d.raised_by: self.send_auto_reply(d) - webnotes.conn.commit() # extract attachments self.save_attachments(d, mail.attachments) - webnotes.conn.begin() def save_attachments(self, doc, attachment_list=[]): @@ -139,14 +135,12 @@ class SupportMailbox(POP3Mailbox): """ from webnotes.utils.file_manager import save_file, add_file_list for attachment in attachment_list: - webnotes.conn.begin() fid = save_file(attachment['filename'], attachment['content'], 'Support') status = add_file_list('Support Ticket', doc.name, attachment['filename'], fid) if not status: doc.description = doc.description \ + "\nCould not attach: " + cstr(attachment['filename']) doc.save() - webnotes.conn.commit() def send_auto_reply(self, d):