From 9e98ad0cc21d825b676b66d0fbadbdd671b32602 Mon Sep 17 00:00:00 2001 From: rshorey Date: Fri, 12 Apr 2019 16:33:56 -0400 Subject: [PATCH] make sure filer id is always in prez csv --- cycle_2020/views.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cycle_2020/views.py b/cycle_2020/views.py index f853dc4..34602c1 100644 --- a/cycle_2020/views.py +++ b/cycle_2020/views.py @@ -445,6 +445,12 @@ def rows_with_totals(): row.append(value) for f in filing_fields: if not filing: + if f == 'filer_id': + #if there is no filing, use the candidate's committee id + value = getattr(result, "fec_committee_id") + if value is not None: + row.append(value) + continue row.append("") continue value = getattr(filing, f)