Skip to content

Commit

Permalink
Merge pull request #1725 from wittejm/remove-counties-with-balances-f…
Browse files Browse the repository at this point in the history
…rom-osp-form

filter out counties with balances from list added to OSP form
  • Loading branch information
wittejm authored May 24, 2024
2 parents f1c6cab + fcf3a0c commit 46ed0e1
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/backend/expungeservice/form_filling.py
Original file line number Diff line number Diff line change
Expand Up @@ -697,8 +697,12 @@ def _create_and_write_pdf(

@staticmethod
def counties_with_cases_to_expunge(all_case_results: List[CaseResults]):
counties: List[str] = []
counties_with_eligible_charge: List[str] = []
counties_with_balances: List[str] = []
for case_result in all_case_results:
if case_result.has_eligible_charges and case_result.case.summary.location not in counties:
counties.append(case_result.case.summary.location)
return counties
if case_result.has_eligible_charges and case_result.case.summary.location not in counties_with_eligible_charge:
counties_with_eligible_charge.append(case_result.case.summary.location)
if case_result.case.summary.balance_due_in_cents != 0:
counties_with_balances.append(case_result.case.summary.location)
counties_with_expungements = [county for county in counties_with_eligible_charge if county not in counties_with_balances]
return counties_with_expungements

0 comments on commit 46ed0e1

Please sign in to comment.