report: fix checking attachments when checking if the report is empty
Some checks failed
Run tests / tests (push) Failing after 1m4s

This commit is contained in:
Benjamin Renard 2024-05-02 15:56:41 +02:00
parent 296618a34e
commit 9e3faee819
Signed by: bn8
GPG key ID: 3E2E1CE1907115BC

View file

@ -132,7 +132,7 @@ class Report(ConfigurableObject): # pylint: disable=useless-object-inheritance
" email_client"
)
content = self.get_content()
if not content:
if not content and not self._attachment_files and not self._attachment_payloads:
log.debug("Report is empty, do not send it")
return True
msg = email_client.forge_message(