From 07a90dae8c767a18cfef9d7e7968f049e27b79bd Mon Sep 17 00:00:00 2001 From: Benni Baermann Date: Mon, 3 May 2021 12:32:20 +0200 Subject: [PATCH] bugfix _ext is now added bevor @ in email --- evapp/views.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/evapp/views.py b/evapp/views.py index 9d93e33..c17031c 100644 --- a/evapp/views.py +++ b/evapp/views.py @@ -63,9 +63,10 @@ class EvaFormView(LoginRequiredMixin, CookieWizardView): data = super().get_all_cleaned_data() if not data['intern']: print("intern employee detected") - if not data['email'].endswith('_ext'): - print('added "_ext" to mail adress') - data['email'] += '_ext' + (user, domain) = data['email'].split('@') + if not user.endswith('_ext'): + print('add "_ext" to mail adress...') + data['email'] = f'{user}_ext@{domain}' print("delete CHOICE FROM DATA") if 'choice' in data: