Commit 32d815f1 authored by Jérome Perrin's avatar Jérome Perrin

Formulator: fix FormToXML on py2 with non ascii form group names

parent e33f1b6c
...@@ -26,7 +26,7 @@ def formToXML(form, prologue=1): ...@@ -26,7 +26,7 @@ def formToXML(form, prologue=1):
# export form groups # export form groups
for group in form.get_groups(include_empty=1): for group in form.get_groups(include_empty=1):
group_element = SubElement(groups, 'group') group_element = SubElement(groups, 'group')
group_element.append(E.title(group)) group_element.append(E.title(str2unicode(group, encoding)))
fields = SubElement(group_element, 'fields') fields = SubElement(group_element, 'fields')
for field in form.get_fields_in_group(group, include_disabled=1): for field in form.get_fields_in_group(group, include_disabled=1):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment