From f4a6e17830e01a48cb1adffb1d1c08cc5a09950a Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 28 Dec 2012 13:43:42 +0530 Subject: [PATCH] ignore attach, email validation fixes in support_ticket --- support/doctype/support_ticket/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/support/doctype/support_ticket/__init__.py b/support/doctype/support_ticket/__init__.py index 90dc1e32ce9..da1755feb9b 100644 --- a/support/doctype/support_ticket/__init__.py +++ b/support/doctype/support_ticket/__init__.py @@ -109,6 +109,11 @@ class SupportMailbox(POP3Mailbox): d.naming_series = opts and opts.split("\n")[0] or 'SUP' try: d.save(1) + try: + # extract attachments + self.save_attachments(d, mail.attachments) + except Exception, e: + self.description += "\n\n[Did not pull attachment]" except: d.description = 'Unable to extract message' d.save(1) @@ -118,8 +123,6 @@ class SupportMailbox(POP3Mailbox): if "mailer-daemon" not in d.raised_by.lower(): self.send_auto_reply(d) - # extract attachments - self.save_attachments(d, mail.attachments) def save_attachments(self, doc, attachment_list=[]): """