Update frappe/email/doctype/email_account/email_account.py

Co-authored-by: gavin <gavin18d@gmail.com>
This commit is contained in:
Manuel 2021-11-25 13:30:45 +01:00 committed by GitHub
parent 1bbba495f8
commit 171e8b06f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -549,7 +549,7 @@ class EmailAccount(Document):
def on_trash(self):
"""Clear communications where email account is linked"""
Communication = frappe.qb.from_("Communication")
Communication = frappe.qb.DocType("Communication")
frappe.qb.update(Communication) \
.set(Communication.email_account == "") \
.where(Communication.email_account == self.name).run()