summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tabellio/pcfdb/sync.py15
1 files 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'<tr><td>Présidents de groupe</td><td><ul>'
- if len(presgroups) > 1:
- for presgroup in presgroups[:-1]:
- table += u'<li>%s</li>' % get_link(presgroup[1], presgroup[2])
- table += u'<li>%s</li></ul></td></tr>' % get_link(presgroups[-1][1], presgroups[-1][2])
+ if presgroups:
+ presgroup = presgroups[0]
+ table = conf_pres_table
+ table += u'<tr><td>Présidents de groupe</td><td><ul>'
+ if len(presgroups) > 1:
+ for presgroup in presgroups[:-1]:
+ table += u'<li>%s</li>' % get_link(presgroup[1], presgroup[2])
+ table += u'<li>%s</li></ul></td></tr>' % get_link(presgroups[-1][1], presgroups[-1][2])
table += u'<tr><td>Greffier (Secrétaire général)</td><td>%s</td></tr>' % self.settings.greffier_name