From 97b1bf4b19fc758087a7b0f2563679234e39bd30 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 5 Jan 2012 15:46:47 +0530 Subject: [PATCH] Fixed support ticket issue --- erpnext/support/doctype/support_ticket/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/support/doctype/support_ticket/__init__.py b/erpnext/support/doctype/support_ticket/__init__.py index bff98d2534c..0e73cf77828 100644 --- a/erpnext/support/doctype/support_ticket/__init__.py +++ b/erpnext/support/doctype/support_ticket/__init__.py @@ -47,15 +47,15 @@ class SupportMailbox(POP3Mailbox): if "<" in mail.mail['From']: import re re_result = re.findall('(?<=\<)(\S+)(?=\>)', mail.mail['From']) - if re_result and re_result[0]: email_id = res_result[0] + if re_result and re_result[0]: email_id = re_result[0] for thread_id in thread_list: exists = webnotes.conn.sql("""\ SELECT name FROM `tabSupport Ticket` - WHERE name=%s AND raised_by REGEXP '%s' - """ % ('(' + email_id + ')',), thread_id) + WHERE name=%s AND raised_by REGEXP %s + """ , (thread_id, '(' + email_id + ')')) if exists and exists[0] and exists[0][0]: from webnotes.model.code import get_obj