Merge branch 'develop' into bump_redis

This commit is contained in:
Suraj Shetty 2023-03-31 14:04:02 +05:30 committed by GitHub
commit 06cb58aa85
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View file

@ -70,7 +70,7 @@ class CommunicationEmailMixin:
if include_sender:
cc.append(self.sender_mailid)
if is_inbound_mail_communcation:
if (doc_owner := self.get_owner()) not in frappe.STANDARD_USERS:
if (doc_owner := self.get_owner()) and (doc_owner not in frappe.STANDARD_USERS):
cc.append(doc_owner)
cc = set(cc) - {self.sender_mailid}
cc.update(self.get_assignees())
@ -216,7 +216,11 @@ class CommunicationEmailMixin:
"reference_name": self.reference_name,
"reference_type": self.reference_doctype,
}
return ToDo.get_owners(filters)
if self.reference_doctype and self.reference_name:
return ToDo.get_owners(filters)
else:
return []
@staticmethod
def filter_thread_notification_disbled_users(emails):

View file

@ -69,9 +69,7 @@ class SMTPServer:
if not self.server:
frappe.msgprint(
_(
"Email Account not setup. Please create a new Email Account from Settings > Email Account"
),
_("Email Account not setup. Please create a new Email Account from Settings > Email Account"),
raise_exception=frappe.OutgoingEmailError,
)