palewire / django-calaccess-campaign-browser

A Django app to refine, review and republish campaign finance data drawn from the California Secretary of State’s CAL-ACCESS database
http://django-calaccess-campaign-browser.californiacivicdata.org
MIT License
17 stars 12 forks source link

Committee expenditure list error #217

Open rkiddy opened 9 years ago

rkiddy commented 9 years ago

Perhaps this should go into the data project. Perhaps more validation is needed. :-)

I navigated to http://localhost:8000/committee/5934/ and then selected the "Expenditures" menu item and then "ALL" and I got this:

AttributeError at /committee/5934/expenditures/1/

'Committee' object has no attribute 'expenditure_set'

Request Method:     GET
Request URL:    http://localhost:8000/committee/5934/expenditures/1/
Django Version:     1.7.7
Exception Type:     AttributeError
Exception Value:    

'Committee' object has no attribute 'expenditure_set'

Exception Location:     /home/ray/.local/lib/python2.7/site-packages/calaccess_campaign_browser/views/committees.py in get_queryset, line 89
Python Executable:  /usr/bin/python
Python Version:     2.7.6
Python Path:    

['/home/ray/Projects/OpenCA/ccdc',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-x86_64-linux-gnu',
 '/usr/lib/python2.7/lib-tk',
 '/usr/lib/python2.7/lib-old',
 '/usr/lib/python2.7/lib-dynload',
 '/home/ray/.local/lib/python2.7/site-packages',
 '/usr/local/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages/PILcompat',
 '/usr/lib/python2.7/dist-packages/gtk-2.0',
 '/usr/lib/python2.7/dist-packages/ubuntu-sso-client']

Server time:    Tue, 28 Apr 2015 16:32:51 +0000
palewire commented 9 years ago

Def. a bug in the "view." Thanks for posting.