-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove 'None' value from list cycles_has_activity in ofec_committee_h… #3427
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fec-jli if we leave the logic as a control on the cms side rather than (or in addition to) sql, then should we also filter for any non-integer value rather than only None? For expediency I am approving now.
Thanks @jason-upchurch review it. for now, we only get 'None' value from sql query return, not sure if we will get other value. I will talk to database team to see any concern. Thanks. |
Thanks @fec-jli I think the datatype in the db is specified as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome @fec-jli! . This looks like a data issue. Thanks for adding extra validation when the cycles have bad data likeNone
Codecov Report
@@ Coverage Diff @@
## develop #3427 +/- ##
===========================================
+ Coverage 74.92% 74.92% +<.01%
===========================================
Files 120 120
Lines 7349 7351 +2
Branches 642 642
===========================================
+ Hits 5506 5508 +2
Misses 1843 1843
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great @fec-jli nice job!
6a67678
to
46106ba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks @fec-jli!
Summary (required)
C00140590 committee profile page is throwing a server error.
Include a summary of proposed changes.
modify cms load_committee_history function in views.py
to clean cycles_has_activity, remove 'None' value in cycles_has_activity
committee['cycles_has_activity'] = list(filter(None, committee.get('cycles_has_activity')))
Impacted areas of the application
committee profile page
How to test
2)pytest
./manage.py test
3)npm run test-single
(wrong one)
prod: https://www.fec.gov/data/committee/C00140590/
local: http://127.0.0.1:8000/data/committee/C00140590/
(correct one should not affected)
prod: https://www.fec.gov/data/committee/C00105668/
local: http://127.0.0.1:8000/data/committee/C00105668/
We should create an separated issue to fix ofec_committee_history_mv