Encode with UTF-8 to avoid crashing on Unicode content
- Legacy-Id: 4773
This commit is contained in:
parent
bb30e1d681
commit
2f48dfc713
|
@ -284,7 +284,7 @@ class UploadForm(forms.Form):
|
|||
if self.cleaned_data['txt']:
|
||||
destination.write(self.cleaned_data['txt'])
|
||||
else:
|
||||
destination.write(self.cleaned_data['content'])
|
||||
destination.write(self.cleaned_data['content'].encode("utf-8"))
|
||||
|
||||
@role_required('Area Director','Secretariat')
|
||||
def submit(request, name, option=None):
|
||||
|
|
Loading…
Reference in a new issue