Skip to content

Commit

Permalink
Merge pull request #1736 from emko-274/master
Browse files Browse the repository at this point in the history
Uncommented counties_with_cases_to_expunge to resolve error
  • Loading branch information
emko-274 authored Jul 27, 2024
2 parents 0f537d9 + 5957974 commit 5c28c24
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/backend/expungeservice/form_filling.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,10 +398,12 @@ def extra_mappings(self):
for i in range(10):
#osp_fields[f"(Court {i+1})"] = f"Circuit Court for {s.counties_with_cases_to_expunge[i]} County" if i<len(s.counties_with_cases_to_expunge) else ""
osp_fields[f"(Court {i+1})"] = ""
if s.has_eligible_convictions:

"""if s.has_eligible_convictions:
osp_fields["(Include a Conviction Yes)"] = True
else:
osp_fields["(Include a Conviction No)"] = True
osp_fields["(Include a Conviction No)"] = True"""
return osp_fields
return {
"(FOR THE COUNTY OF)": s.county,
Expand Down
3 changes: 1 addition & 2 deletions src/backend/tests/fixtures/form_filling_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"(Court 8)": "<>",
"(Court 9)": "<>",
"(Court 10)": "<>",
"(Include a Conviction Yes)": "/Yes",
"(Include a Conviction Yes)": "/Off",
"(Include a Conviction No)": "/Off",
}
oregon_john_common_pdf_fields = {
Expand Down Expand Up @@ -854,4 +854,3 @@
}
},
}

3 changes: 2 additions & 1 deletion src/pdf-frontend/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def handle_person(output, client, row):
aliases = [alias]
response = client.post("http://localhost:5000/api/search", json={"aliases": aliases})
record = json.loads(response.text)["record"]
print(record)

name = f"{first_name} {middle} {last_name}"
officer = row.get("Officer", "").upper().strip()
header = build_header(aliases, name, birth_date, officer)
Expand All @@ -55,6 +55,7 @@ def handle_person(output, client, row):
print(f"TOO LARGE TO ANALYZE: {name} {aliases}")
else:
print(f"BLANK RECORD: {name} {aliases}")
return pdf


def search_and_dump_many_records(source_filename="source/names.csv", output="output/"):
Expand Down

0 comments on commit 5c28c24

Please sign in to comment.