[fix] don't validate email address on receive
This commit is contained in:
parent
5ccfe9acd7
commit
10097bedbb
2 changed files with 2 additions and 1 deletions
|
|
@ -70,7 +70,7 @@ def make(doctype=None, name=None, content=None, subject=None, sent_or_received =
|
|||
|
||||
def validate_email(doc):
|
||||
"""Validate Email Addresses of Recipients and CC"""
|
||||
if not (doc.communication_type=="Communication" and doc.communication_medium == "Email"):
|
||||
if not (doc.communication_type=="Communication" and doc.communication_medium == "Email") or doc.flags.in_receive:
|
||||
return
|
||||
|
||||
# validate recipients
|
||||
|
|
|
|||
|
|
@ -216,6 +216,7 @@ class EmailAccount(Document):
|
|||
|
||||
self.set_thread(communication, email)
|
||||
|
||||
communication.flags.in_receive = True
|
||||
communication.insert(ignore_permissions = 1)
|
||||
|
||||
# save attachments
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue