From 4ddb26f6def9c32e10f325189f1ab6272ef44b7f 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:26:29 +0200 Subject: [PATCH] handle having no group presidents (#33438) --- tabellio/pcfdb/sync.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tabellio/pcfdb/sync.py b/tabellio/pcfdb/sync.py index 33ca505..0c14438 100644 --- a/tabellio/pcfdb/sync.py +++ b/tabellio/pcfdb/sync.py @@ -1518,13 +1518,14 @@ class SyncFromPcfDbView(BrowserView): nom, prenom, description = row presgroups.append((description, nom, prenom)) - presgroup = presgroups[0] - table = conf_pres_table - table += u'Présidents de groupe' % get_link(presgroups[-1][1], presgroups[-1][2]) + if presgroups: + presgroup = presgroups[0] + table = conf_pres_table + table += u'Présidents de groupe' % get_link(presgroups[-1][1], presgroups[-1][2]) table += u'Greffier (Secrétaire général)%s' % self.settings.greffier_name