From d07ee2e4d9d54291372aa1db727ac86724892598 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Mon, 27 May 2019 14:22:46 +0200 Subject: [PATCH] handle having no secretaire --- tabellio/pcfdb/sync.py | 13 +++++++------ 1 file 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'%s%s' % ( vicepresident[0], get_link(vicepresident[1], vicepresident[2])) - secretaire = secretaires[0] - table += u'Secrétaires du Parlement' % get_link(secretaires[-1][1], secretaires[-1][2]) + if secretaires: + secretaire = secretaires[0] + table += u'Secrétaires du Parlement' % get_link(secretaires[-1][1], secretaires[-1][2]) conf_pres_table = table table += u'''Greffier (Secrétaire général)