use beautify_data() in mails too. added TODO with known bug

This commit is contained in:
Benni Bärmann 2021-01-19 10:32:31 +01:00
parent aa64972fff
commit 07b4e9bf72
2 changed files with 6 additions and 2 deletions

3
TODO Normal file
View File

@ -0,0 +1,3 @@
known bugs:
html problem in mails: 14" -> 14"

View File

@ -58,7 +58,7 @@ class EvaFormView(CookieWizardView):
data = self.get_all_cleaned_data()
newdata = {k: v for k, v in data.items() if (k in MAILS[department]['DATA'])}
context = {'data': newdata}
context = {'data': self.beautify_data(newdata)}
try:
mail_template = get_template(f'evapp/{department}_mail.txt')
@ -90,6 +90,7 @@ class EvaFormView(CookieWizardView):
and v in choices})
# replace values in accounts array from *_CHOICES
if 'accounts' in data:
data['accounts'] = [ACCOUNT_CHOICES[c] for c in data['accounts']]