diff --git a/apps/accounts/automations/backup_account/handlers.py b/apps/accounts/automations/backup_account/handlers.py index 251a7d605..4b76f1ebb 100644 --- a/apps/accounts/automations/backup_account/handlers.py +++ b/apps/accounts/automations/backup_account/handlers.py @@ -235,8 +235,8 @@ class AccountBackupHandler: except Exception as e: error = str(e) print(f'\033[31m>>> {error}\033[0m') - self.execution.status = Status.error - self.execution.summary['error'] = error + self.manager.status = Status.error + self.manager.summary['error'] = error def backup_by_obj_storage(self): object_id = self.execution.snapshot.get('id') diff --git a/apps/common/tasks.py b/apps/common/tasks.py index f87cfd7f6..7653423cc 100644 --- a/apps/common/tasks.py +++ b/apps/common/tasks.py @@ -97,10 +97,7 @@ def send_mail_attachment_async(subject, message, recipient_list, attachment_list for attachment in attachment_list: email.attach_file(attachment) os.remove(attachment) - try: - return email.send() - except Exception as e: - logger.error("Sending mail attachment error: {}".format(e)) + return email.send() @shared_task(