From f4e05a079947ec1a7911dc0647991409b6e72e30 Mon Sep 17 00:00:00 2001 From: chol Date: Mon, 5 Feb 2024 14:23:53 +0100 Subject: [PATCH] added first day of employment to email subject --- evapp/views.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/evapp/views.py b/evapp/views.py index 72f5914..f7b8689 100644 --- a/evapp/views.py +++ b/evapp/views.py @@ -141,25 +141,26 @@ class EvaFormView(LoginRequiredMixin, CookieWizardView): context = {'data': self.beautify_data(newdata), 'contact': contact} firstname = data['firstname'] lastname = data['lastname'] + firstday = data['firstdate_employment'] try: mail_template = get_template(f'evapp/department_mail.txt') if settings.MAILTEST: send_mail( - f'EVA: Neuzugang {firstname} {lastname} (MAILTEST)', + f'EVA: Neuzugang {firstname} {lastname} {firstday} (MAILTEST)', mail_template.render(context), EVA_MAIL, [EVA_MAIL], fail_silently=False) elif department != "SUBMITTER": send_mail( - f'EVA: Neuzugang {firstname} {lastname}', + f'EVA: Neuzugang {firstname} {lastname} {firstday}', mail_template.render(context), EVA_MAIL, [MAILS[department]['MAIL']], fail_silently=False) else: send_mail( - f'EVA: Neuzugang {firstname} {lastname}', + f'EVA: Neuzugang {firstname} {lastname} {firstday}', mail_template.render(context), EVA_MAIL, [contact],