bugfix _ext is now added bevor @ in email

This commit is contained in:
Benni Bärmann 2021-05-03 12:32:20 +02:00
parent d16c58610e
commit 07a90dae8c
1 changed files with 4 additions and 3 deletions

View File

@ -63,9 +63,10 @@ class EvaFormView(LoginRequiredMixin, CookieWizardView):
data = super().get_all_cleaned_data() data = super().get_all_cleaned_data()
if not data['intern']: if not data['intern']:
print("intern employee detected") print("intern employee detected")
if not data['email'].endswith('_ext'): (user, domain) = data['email'].split('@')
print('added "_ext" to mail adress') if not user.endswith('_ext'):
data['email'] += '_ext' print('add "_ext" to mail adress...')
data['email'] = f'{user}_ext@{domain}'
print("delete CHOICE FROM DATA") print("delete CHOICE FROM DATA")
if 'choice' in data: if 'choice' in data: