Skip to content
This repository has been archived by the owner on May 13, 2019. It is now read-only.

Commit

Permalink
Fixed crash when FEC contributor name null.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethan Phelps-Goodman committed Apr 4, 2012
1 parent 7ec3251 commit 31b3e3b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions influence/views.py
Expand Up @@ -272,8 +272,10 @@ def org_contribution_section(entity_id, standardized_name, cycle, amount, type,
section['fec_summary'] = api.org.fec_summary(entity_id)
if section['fec_summary']:
section['fec_summary']['clean_date'] = datetime.datetime.strptime(section['fec_summary']['date'], "%Y-%m-%d")
section['fec_top_contribs_data'] = json.dumps([dict(key=generate_label(row['contributor_name'], 27), value=row['amount'], href='')
for row in api.org.fec_top_contribs(entity_id)])
section['fec_top_contribs_data'] = \
json.dumps([dict(key=generate_label(row['contributor_name'] if row['contributor_name'] else '<Name Missing>', 27),
value=row['amount'], href='')
for row in api.org.fec_top_contribs(entity_id)])

section['fec_indexp'] = api.org.fec_indexp(entity_id)[:10]

Expand Down

0 comments on commit 31b3e3b

Please sign in to comment.