Skip to content

Commit

Permalink
Neutral citation in search results includes press summaries.
Browse files Browse the repository at this point in the history
  • Loading branch information
dragon-dxw committed Sep 18, 2023
1 parent 01ea57b commit f1a8273
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/caselawclient/responses/search_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,15 +172,17 @@ def uri(self) -> DocumentURIString:
@property
def neutral_citation(self) -> str:
"""
:return: The neutral citation of the search result
:return: The neutral citation of the search result, or the judgment it is a press summary of.
"""

return self._get_xpath_match_string("search:extracted/uk:cite/text()")
return self._get_xpath_match_string(
"search:extracted/uk:cite/text()"
) or self._get_xpath_match_string("search:extracted/akn:neutralCitation/text()")

@property
def name(self) -> str:
"""
:return: The neutral citation of the search result
:return: The title of the search result's document
"""

return self._get_xpath_match_string("search:extracted/akn:FRBRname/@value")
Expand Down

0 comments on commit f1a8273

Please sign in to comment.