summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2012-09-14 11:48:51 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2012-09-14 11:48:51 (GMT)
commit3db3267c5c0f871d1d98af484130c0a24dde3067 (patch)
tree771860395fd4642f7002936c51a5538d1562eaf6
parent1d6e6b680ac1719efdbba7db0ad752c9961093a7 (diff)
downloadtabellio.webviews-3db3267c5c0f871d1d98af484130c0a24dde3067.zip
tabellio.webviews-3db3267c5c0f871d1d98af484130c0a24dde3067.tar.gz
tabellio.webviews-3db3267c5c0f871d1d98af484130c0a24dde3067.tar.bz2
do not fail on political group being unicode
-rw-r--r--tabellio/webviews/deputy.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tabellio/webviews/deputy.py b/tabellio/webviews/deputy.py
index fb36735..36e4fec 100644
--- a/tabellio/webviews/deputy.py
+++ b/tabellio/webviews/deputy.py
@@ -355,7 +355,10 @@ class CsvView(BrowserView):
else:
row.append(None)
if object.polgroup:
- row.append(object.polgroup.to_object.title)
+ polgroup_name = object.polgroup.to_object.title
+ if type(polgroup_name) is unicode:
+ polgroup_name = polgroup_name.encode('utf-8')
+ row.append(polgroup_name)
else:
row.append(None)
row.extend(address_as_csv(object.private_address))