From 3c6d05e0e363115b0b417cef323e6715ed22030e Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Mon, 1 Feb 2021 18:12:59 +0100 Subject: [PATCH] Correction export. candidats --- candidats/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/candidats/admin.py b/candidats/admin.py index a291677..6eedddb 100644 --- a/candidats/admin.py +++ b/candidats/admin.py @@ -48,7 +48,7 @@ def export_candidates(modeladmin, request, queryset): for cand in queryset.values_list(*export_fields.values()): values = [] for value, field_name in zip(cand, export_fields.values()): - if value != '' and field_name in choice_fields: + if value != '' and value is not None and field_name in choice_fields: value = choice_fields[field_name][value] if field_name in boolean_fields: value = 'Oui' if value else ''