Skip to content

Commit 119a2d3

Browse files
committed
fix: exception
1 parent 8212c59 commit 119a2d3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

basxconnect/invoicing/views.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,11 @@ def send_message(
8282
email = EmailMessage(
8383
subject=send_form.cleaned_data["subject"],
8484
body=send_form.cleaned_data["body"],
85-
to=[recp["recipient"] for recp in recipient_formset.cleaned_data],
85+
to=[
86+
recp["recipient"]
87+
for recp in recipient_formset.cleaned_data
88+
if "recipient" in recp
89+
],
8690
)
8791
filename, data = send_form.cleaned_data["template"].generate_document_pdf(
8892
invoice

0 commit comments

Comments
 (0)