fix(EmailQueue): ensure communication exists before updating delivery status
This commit is contained in:
parent
9a22cabd95
commit
615b2c5e8d
1 changed files with 1 additions and 1 deletions
|
|
@ -129,7 +129,7 @@ class EmailQueue(Document):
|
|||
|
||||
def update_status(self, status, commit=False, **kwargs):
|
||||
self.update_db(status=status, commit=commit, **kwargs)
|
||||
if self.communication:
|
||||
if self.communication and frappe.db.exists("Communication", self.communication):
|
||||
communication_doc = frappe.get_doc("Communication", self.communication)
|
||||
communication_doc.set_delivery_status(commit=commit)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue