#8 Remove hint for mail-delivery if mail is already active

This commit is contained in:
2025-05-27 19:21:14 +02:00
parent 6d1c452ea8
commit 0b27385a24
2 changed files with 9 additions and 3 deletions
+2 -1
View File
@@ -58,7 +58,8 @@ def send_mail(member: models.Members):
path_to_file = os.path.join(os.path.expanduser("~"),"sust","payment_slips","mail",f"{member.member_zip}_payment_slip_member{member.id}.pdf")
if not exists(path_to_file):
create_payment_slip(member=member)
create_payment_slip(member=member,
forMail=True)
with open(path_to_file, 'rb') as f:
attachment = MIMEApplication(f.read(), _subtype='pdf')