Fixed support ticket issue
This commit is contained in:
parent
dc64802e96
commit
97b1bf4b19
@ -47,15 +47,15 @@ class SupportMailbox(POP3Mailbox):
|
|||||||
if "<" in mail.mail['From']:
|
if "<" in mail.mail['From']:
|
||||||
import re
|
import re
|
||||||
re_result = re.findall('(?<=\<)(\S+)(?=\>)', mail.mail['From'])
|
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:
|
for thread_id in thread_list:
|
||||||
exists = webnotes.conn.sql("""\
|
exists = webnotes.conn.sql("""\
|
||||||
SELECT name
|
SELECT name
|
||||||
FROM `tabSupport Ticket`
|
FROM `tabSupport Ticket`
|
||||||
WHERE name=%s AND raised_by REGEXP '%s'
|
WHERE name=%s AND raised_by REGEXP %s
|
||||||
""" % ('(' + email_id + ')',), thread_id)
|
""" , (thread_id, '(' + email_id + ')'))
|
||||||
if exists and exists[0] and exists[0][0]:
|
if exists and exists[0] and exists[0][0]:
|
||||||
from webnotes.model.code import get_obj
|
from webnotes.model.code import get_obj
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user