Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Attempt to handle broken document_number's
Browse files Browse the repository at this point in the history
ttys0dev committed Nov 18, 2023
1 parent 4204782 commit ee3eb15
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions cl/recap/mergers.py
Original file line number Diff line number Diff line change
@@ -776,13 +776,7 @@ async def add_docket_entries(
# Then make the RECAPDocument object. Try to find it. If we do, update
# the pacer_doc_id field if it's blank. If we can't find it, create it
# or throw an error.
params = {
"docket_entry": de,
# Normalize to "" here. Unsure why, but RECAPDocuments have a
# char field for this field while DocketEntries have a integer
# field.
"document_number": docket_entry["document_number"] or "",
}
params = {"docket_entry": de}
if not docket_entry["document_number"] and docket_entry.get(
"short_description"
):
@@ -816,6 +810,12 @@ async def add_docket_entries(
).aexists()
if appellate_rd_att_exists:
params["document_type"] = RECAPDocument.ATTACHMENT
params["pacer_doc_id"] = docket_entry["pacer_doc_id"]
elif de_created is False and docket_entry.get("attachment_number"):
# Normalize to "" here. Unsure why, but RECAPDocuments have a
# char field for this field while DocketEntries have a integer
# field.
params["document_number"] = docket_entry["document_number"] or ""
try:
rd = await RECAPDocument.objects.aget(**params)
except RECAPDocument.DoesNotExist:

0 comments on commit ee3eb15

Please sign in to comment.