datamade / django-councilmatic

:heartpulse: Django app providing core functions for *.councilmatic.org
http://councilmatic.org
MIT License
26 stars 16 forks source link

Adjust models and views for LA Metro Councilmatic upgrade #260

Closed fgregg closed 4 years ago

fgregg commented 4 years ago

Description

This PR:

fgregg commented 4 years ago

Sorry for my inadequate commit message for https://github.com/datamade/django-councilmatic/pull/260/commits/85e518ab6fb912a2bfa574e4e53abd82a2d1f412.

What prompted me to remove this was problem: https://github.com/datamade/la-metro-councilmatic/pull/514#issuecomment-562295986

We don't have any code in our signal handler to create or update CouncilmaticBillDocuments when the OCD Bill Documents are created. As such, when we went to go query for bills with documents we were getting nothing (because they were checking councilmatic bill document, not the ocd one).

I missed that this broke the tests.

fgregg commented 4 years ago

I can take this on to fully fix, if you'd like.

hancush commented 4 years ago

FWIW, this didn't break the tests: It breaks the search index, which uses the full_text attribute to index attachment text for searching. https://github.com/datamade/la-metro-councilmatic/blob/9a8c0dd232aac453696281d47d256fcb5d98d0d4/lametro/search_indexes.py#L46