use beautify_data() in mails too. added TODO with known bug
This commit is contained in:
parent
aa64972fff
commit
07b4e9bf72
|
@ -58,7 +58,7 @@ class EvaFormView(CookieWizardView):
|
||||||
data = self.get_all_cleaned_data()
|
data = self.get_all_cleaned_data()
|
||||||
newdata = {k: v for k, v in data.items() if (k in MAILS[department]['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:
|
try:
|
||||||
mail_template = get_template(f'evapp/{department}_mail.txt')
|
mail_template = get_template(f'evapp/{department}_mail.txt')
|
||||||
|
@ -90,6 +90,7 @@ class EvaFormView(CookieWizardView):
|
||||||
and v in choices})
|
and v in choices})
|
||||||
|
|
||||||
# replace values in accounts array from *_CHOICES
|
# replace values in accounts array from *_CHOICES
|
||||||
|
if 'accounts' in data:
|
||||||
data['accounts'] = [ACCOUNT_CHOICES[c] for c in data['accounts']]
|
data['accounts'] = [ACCOUNT_CHOICES[c] for c in data['accounts']]
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue