Save submitted session agendas as UTF-8, not as ascii.
- Legacy-Id: 11551
This commit is contained in:
parent
b385c73078
commit
e7eb4975b0
|
@ -1,6 +1,7 @@
|
|||
import datetime
|
||||
import os
|
||||
import re
|
||||
import codecs
|
||||
|
||||
from django import forms
|
||||
from django.core.validators import ValidationError
|
||||
|
@ -304,7 +305,7 @@ class InterimSessionModelForm(forms.ModelForm):
|
|||
directory = os.path.dirname(path)
|
||||
if not os.path.exists(directory):
|
||||
os.makedirs(directory)
|
||||
with open(path, "w") as file:
|
||||
with codecs.open(path, "w", encoding='utf-8') as file:
|
||||
file.write(self.cleaned_data['agenda'])
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue