|
18 | 18 | from expungeservice.models.charge_types.reduced_to_violation import ReducedToViolation
|
19 | 19 | from expungeservice.models.charge_types.violation import Violation
|
20 | 20 | from expungeservice.models.record_summary import RecordSummary
|
21 |
| -from expungeservice.old_form_filling import FormFilling as OldFormFilling |
22 | 21 | from expungeservice.pdf.markdown_to_pdf import MarkdownToPDF
|
23 | 22 |
|
24 | 23 | from pdfrw import PdfReader, PdfWriter, PdfDict, PdfObject
|
@@ -116,11 +115,6 @@ def build_zip(record_summary: RecordSummary, user_information: Dict[str, str]) -
|
116 | 115 | trailer.Root.AcroForm = pdf.Root.AcroForm
|
117 | 116 | writer.write(file_path, trailer=trailer)
|
118 | 117 | zipfile.write(file_path, file_name)
|
119 |
| - |
120 |
| - # TODO: Remove |
121 |
| - old_zip_path, old_zip_name = OldFormFilling.build_zip(record_summary, user_information) |
122 |
| - zipfile.write(old_zip_path, old_zip_name) |
123 |
| - |
124 | 118 | zipfile.close()
|
125 | 119 | return zip_path, zip_name
|
126 | 120 |
|
@@ -363,16 +357,21 @@ def _build_pdf_path(location: str, convictions: List[Charge]) -> str:
|
363 | 357 | return path.join(Path(__file__).parent, "files", "oregon_with_conviction_order.pdf")
|
364 | 358 | else:
|
365 | 359 | return path.join(Path(__file__).parent, "files", "oregon_with_arrest_order.pdf")
|
| 360 | + elif location == "multnomah": |
| 361 | + if convictions: |
| 362 | + return path.join(Path(__file__).parent, "files", "multnomah_conviction.pdf") |
| 363 | + else: |
| 364 | + return path.join(Path(__file__).parent, "files", "multnomah_arrest.pdf") |
366 | 365 | else:
|
367 | 366 | return path.join(Path(__file__).parent, "files", "oregon.pdf")
|
368 | 367 |
|
369 | 368 | @staticmethod
|
370 | 369 | def _build_base_file_name(location: str, convictions: List[Charge]) -> str:
|
371 |
| - # Douglas and Umatilla counties explicitly want the "Order" part of the old forms too. |
372 |
| - if location in ["douglas", "umatilla"]: |
373 |
| - if convictions: |
374 |
| - return path.join(Path(__file__).parent, "files", f"{location}_with_conviction_order.pdf") |
375 |
| - else: |
376 |
| - return path.join(Path(__file__).parent, "files", f"{location}_with_arrest_order.pdf") |
| 370 | + # Douglas and Umatilla counties explicitly want the "Order" part of the old forms too. |
| 371 | + if location in ["douglas", "umatilla"]: |
| 372 | + if convictions: |
| 373 | + return path.join(Path(__file__).parent, "files", f"{location}_with_conviction_order.pdf") |
377 | 374 | else:
|
378 |
| - return path.join(Path(__file__).parent, "files", f"{location}.pdf") |
| 375 | + return path.join(Path(__file__).parent, "files", f"{location}_with_arrest_order.pdf") |
| 376 | + else: |
| 377 | + return path.join(Path(__file__).parent, "files", f"{location}.pdf") |
0 commit comments