fix: adjust to bs4 API changes

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
Akhil Narang 2025-12-22 17:10:29 +05:30
parent 588cb1e44d
commit 109af28aec
No known key found for this signature in database
GPG key ID: 9DCC61E211BF645F

View file

@ -230,7 +230,7 @@ class Communication(Document, CommunicationEmailMixin):
html_signature = soup.find("div", {"class": "ql-editor read-mode"})
_signature = None
if html_signature:
_signature = html_signature.renderContents()
_signature = html_signature.encode_contents()
if (cstr(_signature) or signature) not in self.content:
self.content = f'{self.content}</p><br><p class="signature">{signature}'