From dc64802e961c8a001b3e6cfd639317574749ddf9 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 5 Jan 2012 15:19:00 +0530 Subject: [PATCH] Fix Support Ticket --- erpnext/support/doctype/support_ticket/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/support/doctype/support_ticket/__init__.py b/erpnext/support/doctype/support_ticket/__init__.py index fcf4e32d0e3..bff98d2534c 100644 --- a/erpnext/support/doctype/support_ticket/__init__.py +++ b/erpnext/support/doctype/support_ticket/__init__.py @@ -54,8 +54,8 @@ class SupportMailbox(POP3Mailbox): exists = webnotes.conn.sql("""\ SELECT name FROM `tabSupport Ticket` - WHERE name=%s AND raised_by LIKE %s - """, (thread_id, "%" + email_id + "%")) + WHERE name=%s AND raised_by REGEXP '%s' + """ % ('(' + email_id + ')',), thread_id) if exists and exists[0] and exists[0][0]: from webnotes.model.code import get_obj