Skip to content

Commit 84434c0

Browse files
authored
Merge pull request #1811 from wittejm/jw/new-multco-forms
new forms with updated fill logic
2 parents 192d4cf + 9289b01 commit 84434c0

4 files changed

Lines changed: 7 additions & 0 deletions

File tree

71.1 KB
Binary file not shown.
-152 KB
Binary file not shown.

src/backend/expungeservice/form_filling.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,7 @@ def extra_mappings(self):
430430
"(Plaintiff)": "State of Oregon",
431431
"(Case No)": s.case_number_with_comments,
432432
"(Case Number Possibly In Part)": s.case_number_possibly_in_part, # This field appears only on the Multnomah Arrest form.
433+
"(In Part)": s.has_ineligible_charges,
433434
"(Defendant)": s.case_name,
434435
"(DOB)": s.date_of_birth,
435436
"(record of arrest with no charges filed)": s.has_no_complaint,
@@ -473,6 +474,7 @@ def extra_mappings(self):
473474
),
474475
"(the District Attorney at address 2)": s.da_address,
475476
"(Name typed or printed_2)": s.full_name,
477+
"(Service Printed Name)": s.full_name,
476478
}
477479

478480

@@ -541,6 +543,8 @@ def set_font(self, annotation):
541543

542544
def update_annotations(self):
543545
for annotation in self.annotations:
546+
if not annotation.T:
547+
continue
544548
new_value = self.mapper.get(annotation.T)
545549

546550
if annotation.FT == self.BUTTON_TYPE:

src/backend/tests/test_form_filling.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,7 @@ def test_conviction(self, pdf_factory: Callable, conviction_charge_factory: Call
677677
"(Conviction Charges)": "(A Bad Thing; A Bad Thing)",
678678
"(Arrest Dates)": "(Feb 3, 2020)",
679679
"(Full Name---)": "(foo bar)",
680+
"(Service Printed Name)": "(foo bar)",
680681
}
681682
charges = [conviction_charge_factory(2000, 3, 9), conviction_charge_factory(2001, 4, 1)]
682683
assert_pdf_values(pdf_factory(charges), expected_values)
@@ -697,6 +698,7 @@ def test_arrest(self, pdf_factory: Callable, dismissed_charge_factory: Callable)
697698
"(Dismissed Charges)": "(A Bad Thing; A Bad Thing)",
698699
"(DA Number)": "(DA num 0)",
699700
"(Full Name---)": "(foo bar)",
701+
"(Service Printed Name)": "(foo bar)",
700702
}
701703
charges = [dismissed_charge_factory(2001, 4, 1), dismissed_charge_factory(2000, 3, 9)]
702704
assert_pdf_values(pdf_factory(charges), expected_values)
@@ -723,6 +725,7 @@ def test_long_charge_name_and_pdf_write_text(self, MockPdfWriter, pdf_factory: M
723725
"(Full Name)": "(foo bar)",
724726
"(DA Number)": "(DA num 0)",
725727
"(Full Name---)": "(foo bar)",
728+
"(Service Printed Name)": "(foo bar)",
726729
}
727730
charge = dismissed_charge_factory()
728731
charge.name = charge_name

0 commit comments

Comments
 (0)