Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified src/backend/expungeservice/files/multnomah_arrest.pdf
Binary file not shown.
Binary file modified src/backend/expungeservice/files/multnomah_conviction.pdf
Binary file not shown.
4 changes: 4 additions & 0 deletions src/backend/expungeservice/form_filling.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ def extra_mappings(self):
"(Plaintiff)": "State of Oregon",
"(Case No)": s.case_number_with_comments,
"(Case Number Possibly In Part)": s.case_number_possibly_in_part, # This field appears only on the Multnomah Arrest form.
"(In Part)": s.has_ineligible_charges,
"(Defendant)": s.case_name,
"(DOB)": s.date_of_birth,
"(record of arrest with no charges filed)": s.has_no_complaint,
Expand Down Expand Up @@ -473,6 +474,7 @@ def extra_mappings(self):
),
"(the District Attorney at address 2)": s.da_address,
"(Name typed or printed_2)": s.full_name,
"(Service Printed Name)": s.full_name,
}


Expand Down Expand Up @@ -541,6 +543,8 @@ def set_font(self, annotation):

def update_annotations(self):
for annotation in self.annotations:
if not annotation.T:
continue
new_value = self.mapper.get(annotation.T)

if annotation.FT == self.BUTTON_TYPE:
Expand Down
3 changes: 3 additions & 0 deletions src/backend/tests/test_form_filling.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,7 @@ def test_conviction(self, pdf_factory: Callable, conviction_charge_factory: Call
"(Conviction Charges)": "(A Bad Thing; A Bad Thing)",
"(Arrest Dates)": "(Feb 3, 2020)",
"(Full Name---)": "(foo bar)",
"(Service Printed Name)": "(foo bar)",
}
charges = [conviction_charge_factory(2000, 3, 9), conviction_charge_factory(2001, 4, 1)]
assert_pdf_values(pdf_factory(charges), expected_values)
Expand All @@ -697,6 +698,7 @@ def test_arrest(self, pdf_factory: Callable, dismissed_charge_factory: Callable)
"(Dismissed Charges)": "(A Bad Thing; A Bad Thing)",
"(DA Number)": "(DA num 0)",
"(Full Name---)": "(foo bar)",
"(Service Printed Name)": "(foo bar)",
}
charges = [dismissed_charge_factory(2001, 4, 1), dismissed_charge_factory(2000, 3, 9)]
assert_pdf_values(pdf_factory(charges), expected_values)
Expand All @@ -723,6 +725,7 @@ def test_long_charge_name_and_pdf_write_text(self, MockPdfWriter, pdf_factory: M
"(Full Name)": "(foo bar)",
"(DA Number)": "(DA num 0)",
"(Full Name---)": "(foo bar)",
"(Service Printed Name)": "(foo bar)",
}
charge = dismissed_charge_factory()
charge.name = charge_name
Expand Down
Loading