freelawproject / courtlistener

A fully-searchable and accessible archive of court data including growing repositories of opinions, oral arguments, judges, judicial financial records, and federal filings.
https://www.courtlistener.com
Other
550 stars 151 forks source link

fix(favorites): casting page_count from str to int to ensure pray-and-pay emails work #4628

Closed v-anne closed 3 weeks ago

v-anne commented 3 weeks ago

This is following up on the discussion in #4589 and the earlier fix in #4592, which was not comprehensive and missed another instance in the codebase of page_count being temporarily stored as a str instead of an int. It fixes this by casting page_count before the rd is created.

v-anne commented 3 weeks ago

After reviewing @ERosendo's latest comment in the issue, I searched in the codebase for other occurrences of page_count being imported as a str, and found a total of three. The previous PR and this one address two of them, and the last one is for the financial disclosures tool, which is not affected by the pray-and-pay feature. Nevertheless, would it be beneficial to change the code in that spot to cast page_count to an int before it is added to the db? It might be better than trying to figure this out again in the future.

File is cl/disclosures/tasks.py.