Skip to content

Commit

Permalink
Fix missing ContentFile.name
Browse files Browse the repository at this point in the history
  • Loading branch information
DeD1rk authored and ColonelPhantom committed Sep 18, 2024
1 parent 1a0fa9d commit fd230a8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion website/newsletters/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ def save_to_disk(newsletter):
html_message = html_template.render(context)
html_message = embed_linked_html_images(html_message)

newsletter.rendered_file = ContentFile(html_message.encode("utf-8"))
newsletter.rendered_file = ContentFile(
html_message.encode("utf-8"), name="newsletter.html"
)
newsletter.save()


Expand Down

0 comments on commit fd230a8

Please sign in to comment.