Skip to content

Commit

Permalink
Merge pull request #1668 from codeforpdx/jw-skip-pdf-cases-with-balance
Browse files Browse the repository at this point in the history
skip pdf forms if case has a balance
  • Loading branch information
wittejm authored Feb 9, 2023
2 parents 5a86fcc + 066026e commit 3852214
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/backend/expungeservice/form_filling.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def _build_pdf_for_case(
case_number_with_comments = (
f"{case.summary.case_number} (charge {in_part} only)" if ineligible_charges else case.summary.case_number
)
if eligible_charges:
if eligible_charges and case.summary.balance_due_in_cents == 0:
pdf, file_name, warnings = FormFilling._build_pdf_for_eligible_case(
case, eligible_charges, user_information, case_number_with_comments, sid
)
Expand Down
2 changes: 1 addition & 1 deletion src/backend/tests/test_form_filling.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ def test_normal_conviction_uses_multnomah_conviction_form():
with ZipFile(zip_path, "r") as zip_ref:
zip_ref.extractall(temp_dir)
for _root, _dir, files in os.walk(temp_dir):
assert len(files) == 2
assert len(files) == 1

0 comments on commit 3852214

Please sign in to comment.