Skip to content

Commit

Permalink
map additional fields to legal doc
Browse files Browse the repository at this point in the history
  • Loading branch information
teovin committed Jun 10, 2024
1 parent 42575a5 commit 776bb60
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions web/main/legal_document_sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,8 +524,8 @@ def header_template(legal_document):
class CourtListener:
details = {
"name": "CourtListener",
"short_description": "hello",
"long_description": "CourtListener searches millions of opinions across hundreds of jurisdictions",
"short_description": "CourtListener contains millions of legal opinions.",
"long_description": "CourtListener searches millions of opinions across hundreds of jurisdictions.",
"link": settings.COURTLISTENER_BASE_URL,
"search_regexes": [],
"footnote_regexes": [],
Expand Down Expand Up @@ -584,6 +584,7 @@ def pull(legal_doc_source, id):
)
resp.raise_for_status()
cluster = resp.json()
cluster["html_info"] = {"source": "court listener"}

if cluster["filepath_json_harvard"]:
harvard_xml_data = ""
Expand All @@ -608,17 +609,17 @@ def pull(legal_doc_source, id):
]
case = LegalDocument(
source=legal_doc_source,
short_name=cluster["case_name"],
name=cluster["case_name"],
short_name=cluster.get("case_name"),
name=cluster.get("case_name"),
doc_class="Case",
citations=citations,
jurisdiction="",
effective_date=cluster["date_filed"],
publication_date=cluster["date_filed"],
jurisdiction=cluster.get("court_id"),
effective_date=parser.parse(cluster.get("date_filed")),
publication_date=parser.parse(cluster.get("date_modified")),
updated_date=datetime.now(),
source_ref=str(id),
content=case_html,
metadata=None,
metadata=cluster,
)
return case

Expand Down

0 comments on commit 776bb60

Please sign in to comment.