Skip to content
This repository has been archived by the owner on Dec 23, 2017. It is now read-only.

Principal committees are in committees_authorized so they weren't showing #244

Merged
merged 2 commits into from
Jun 8, 2015

Conversation

LindsayYoung
Copy link
Contributor

I'm bringing Principal Committees back.

fixes 18F/openFEC#917

@@ -35,7 +35,7 @@ <h5 class="entity__term__label">District</h5>
<h5 class="entity__term__label">
<a class="term" data-term="Principal Campaign Committee">Principal Committee</a>
</h5>
{% for c in committees if c.designation == 'P' %}
{% for c in committees_authorized if c.designation == 'P' %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To loop over all principal committees, use for c in committee_groups['P']. I noticed that we were looping over all committees several times, so I moved that logic into a groupby in views.py.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. I will make the change

@arowla
Copy link
Contributor

arowla commented Jun 8, 2015

This regression ought to have been caught by the test here (or at least a test like it-- tied to the principal committee link specifically)... but it seems it hasn't been run by Travis/caught by the test runner. We should make sure that this test actually does pass with this fix.

https://github.com/18F/openFEC-web-app/blob/develop/tests/selenium/single_candidate_page.py#L15

To invoke just that test:

$ py.test --selenium tests/selenium/single_candidate_page.py::SingleCandidatePageTests::testCommitteeLink

@arowla
Copy link
Contributor

arowla commented Jun 8, 2015

Oh and I have a fix for the syntax errors in that file here: #246

jmcarp added a commit that referenced this pull request Jun 8, 2015
Principal committees are in committees_authorized so they weren't showing
@jmcarp jmcarp merged commit eaa0dc4 into develop Jun 8, 2015
@jmcarp jmcarp removed the in progress label Jun 8, 2015
@noahmanger noahmanger deleted the feature/princpals-back branch August 3, 2015 22:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants