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
父節點 aa64972fff
當前提交 07b4e9bf72
共有 2 個文件被更改,包括 6 次插入2 次删除

3
TODO Normal file
查看文件

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

查看文件

@ -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']]