summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2014-11-12 11:27:38 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2014-11-12 11:27:38 (GMT)
commit9a33766f31ddad6e627331dc776edcc3da966281 (patch)
treebbc374ca3a5595b01dd437732b0f0911532280f6
parent3d9b3b58fcb3ab19b2aa6acf36cdf00793f2456b (diff)
downloadtabellio.pcfdb-9a33766f31ddad6e627331dc776edcc3da966281.zip
tabellio.pcfdb-9a33766f31ddad6e627331dc776edcc3da966281.tar.gz
tabellio.pcfdb-9a33766f31ddad6e627331dc776edcc3da966281.tar.bz2
handle not having a president (#5928)
-rw-r--r--tabellio/pcfdb/sync.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tabellio/pcfdb/sync.py b/tabellio/pcfdb/sync.py
index 15f6f9c..ad59705 100644
--- a/tabellio/pcfdb/sync.py
+++ b/tabellio/pcfdb/sync.py
@@ -1446,7 +1446,8 @@ class SyncFromPcfDbView(BrowserView):
vicepresidents.sort()
secretaires.sort()
table = u'<table>'
- table += u'<tr><td>Président</td><td>%s</td></tr>' % get_link(president[0], president[1])
+ if president is not None:
+ table += u'<tr><td>Président</td><td>%s</td></tr>' % get_link(president[0], president[1])
for vicepresident in vicepresidents:
table += u'<tr><td>%s</td><td>%s</td></tr>' % (
vicepresident[0], get_link(vicepresident[1], vicepresident[2]))