Skip to content

Commit

Permalink
Merge pull request #4575 from freelawproject/fix_pacer_free_command
Browse files Browse the repository at this point in the history
Update pacer free document command to ignore documents without case number
  • Loading branch information
mlissner authored Oct 15, 2024
2 parents 3aad9a6 + 6eac57d commit ab84c37
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cl/corpus_importer/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,15 @@ def get_and_save_free_document_report(

document_rows_to_create = []
for row in results:

# There is a document without a case number in pacer, skip it (issue #4547)
if not row["docket_number"]:
logger.warning(
f"No case number for document, court: {row["court_id"]}, "
f"date_filed: {row["date_filed"]}"
)
continue

document_row = PACERFreeDocumentRow(
court_id=row["court_id"],
pacer_case_id=row["pacer_case_id"],
Expand Down

0 comments on commit ab84c37

Please sign in to comment.