summaryrefslogtreecommitdiffstats
path: root/tabellio/pcfdb/sync.py
diff options
context:
space:
mode:
Diffstat (limited to 'tabellio/pcfdb/sync.py')
-rw-r--r--tabellio/pcfdb/sync.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/tabellio/pcfdb/sync.py b/tabellio/pcfdb/sync.py
index cc5eb19..33ca505 100644
--- a/tabellio/pcfdb/sync.py
+++ b/tabellio/pcfdb/sync.py
@@ -1468,12 +1468,13 @@ class SyncFromPcfDbView(BrowserView):
for vicepresident in vicepresidents:
table += u'<tr><td>%s</td><td>%s</td></tr>' % (
vicepresident[0], get_link(vicepresident[1], vicepresident[2]))
- secretaire = secretaires[0]
- table += u'<tr><td>Secrétaires du Parlement</td><td><ul>'
- if len(secretaires) > 1:
- for secretaire in secretaires[:-1]:
- table += '<li>%s</li>' % get_link(secretaire[1], secretaire[2])
- table += u'<li>%s</li></ul></td></tr>' % get_link(secretaires[-1][1], secretaires[-1][2])
+ if secretaires:
+ secretaire = secretaires[0]
+ table += u'<tr><td>Secrétaires du Parlement</td><td><ul>'
+ if len(secretaires) > 1:
+ for secretaire in secretaires[:-1]:
+ table += '<li>%s</li>' % get_link(secretaire[1], secretaire[2])
+ table += u'<li>%s</li></ul></td></tr>' % get_link(secretaires[-1][1], secretaires[-1][2])
conf_pres_table = table
table += u'''<tr><td>Greffier (Secrétaire général)</td>