WMDE
/
eva
forked from tohe/eva
7
1
Fork 0

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()
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: