ds-caselaw-marklogic-api-client 22.0.0__py3-none-any.whl → 22.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of ds-caselaw-marklogic-api-client might be problematic. Click here for more details.

@@ -192,20 +192,29 @@ class SearchResult:
192
192
  """
193
193
  :return: The court of the search result
194
194
  """
195
-
195
+ court = None
196
196
  court_code = self._get_xpath_match_string("search:extracted/uk:court/text()")
197
197
  jurisdiction_code = self._get_xpath_match_string(
198
198
  "search:extracted/uk:jurisdiction/text()"
199
199
  )
200
-
201
200
  if jurisdiction_code:
202
- court_code = "%s/%s" % (court_code, jurisdiction_code)
203
-
204
- try:
205
- court = courts.get_by_code(court_code)
206
- except CourtNotFoundException:
207
- court = None
208
-
201
+ court_code_with_jurisdiction = "%s/%s" % (court_code, jurisdiction_code)
202
+ try:
203
+ court = courts.get_by_code(court_code_with_jurisdiction)
204
+ except CourtNotFoundException:
205
+ logging.warning(
206
+ "Court not found with court code %s and jurisdiction code %s for judgment with NCN %s, falling back to court."
207
+ % (court_code, jurisdiction_code, self.neutral_citation)
208
+ )
209
+ if court is None:
210
+ try:
211
+ court = courts.get_by_code(court_code)
212
+ except CourtNotFoundException:
213
+ logging.warning(
214
+ "Court not found with court code %s for judgment with NCN %s, returning None."
215
+ % (court_code, self.neutral_citation)
216
+ )
217
+ court = None
209
218
  return court
210
219
 
211
220
  @property
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ds-caselaw-marklogic-api-client
3
- Version: 22.0.0
3
+ Version: 22.0.1
4
4
  Summary: An API client for interacting with the underlying data in Find Caselaw.
5
5
  Home-page: https://github.com/nationalarchives/ds-caselaw-custom-api-client
6
6
  Keywords: national archives,caselaw
@@ -14,7 +14,7 @@ Requires-Dist: boto3 (>=1.26.112,<2.0.0)
14
14
  Requires-Dist: certifi (>=2022.12.7,<2024.0.0)
15
15
  Requires-Dist: charset-normalizer (>=3.0.0,<4.0.0)
16
16
  Requires-Dist: django-environ (>=0.11.0,<0.12.0)
17
- Requires-Dist: ds-caselaw-utils (>=1.4.0,<2.0.0)
17
+ Requires-Dist: ds-caselaw-utils (>=1.4.1,<2.0.0)
18
18
  Requires-Dist: idna (>=3.4,<4.0)
19
19
  Requires-Dist: lxml (>=5.0.0,<6.0.0)
20
20
  Requires-Dist: memoization (>=0.4.0,<0.5.0)
@@ -15,7 +15,7 @@ caselawclient/models/utilities/move.py,sha256=_SKzO1UVXHFIVvWfT4nuCwdov7acp8tYzz
15
15
  caselawclient/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  caselawclient/responses/__init__.py,sha256=2-5NJn_PXPTje_W4dHeHYaNRN6vXK4UcB9eLLNUAKa4,67
17
17
  caselawclient/responses/search_response.py,sha256=OlzXOEnCg-4HdfOYfeIMdk-UfROOI_Nz-etfznFffok,1335
18
- caselawclient/responses/search_result.py,sha256=brlTqh7HOg16DwW636prekYwD4M9BPU8XS9lFxgBQ7Q,7419
18
+ caselawclient/responses/search_result.py,sha256=BSVE2zBy-sy93fghd_kqwkhgwcnx1mFHY1_HTj-qO70,8096
19
19
  caselawclient/responses/xsl/search_match.xsl,sha256=4Sv--MrwBd7J48E9aI7jlFSXGlNi4dBqgzJ3bdMJ_ZU,1018
20
20
  caselawclient/search_parameters.py,sha256=nR-UC1aWZbdXzXBrVDaHECU4Ro8Zi4JZATtgrpAVsKY,3342
21
21
  caselawclient/xml_helpers.py,sha256=Ihy6OxdEHm7LFePX0XF6uzpyp6yo7U13zyP0nhpBguU,582
@@ -58,7 +58,7 @@ caselawclient/xquery/validate_all_documents.xqy,sha256=z_0YEXmRcZ-FaJM0ouKiTjdI4
58
58
  caselawclient/xquery/xslt.xqy,sha256=w57wNijH3dkwHkpKeAxqjlghVflQwo8cq6jS_sm-erM,199
59
59
  caselawclient/xquery/xslt_transform.xqy,sha256=smyFFxqmtkuOzBd2l7uw6K2oAsYctudrP8omdv_XNAM,2463
60
60
  caselawclient/xquery_type_dicts.py,sha256=A7yNusrb3lMKg6tmMrTOPZcjuJEijWHiBk4hk6eKCMM,5278
61
- ds_caselaw_marklogic_api_client-22.0.0.dist-info/LICENSE.md,sha256=fGMzyyLuQW-IAXUeDSCrRdsYW536aEWThdbpCjo6ZKg,1108
62
- ds_caselaw_marklogic_api_client-22.0.0.dist-info/METADATA,sha256=objjvfpmn9R0wOEgdnEDWMW2-ZiJzoZ_EjzselNGtXg,4006
63
- ds_caselaw_marklogic_api_client-22.0.0.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
64
- ds_caselaw_marklogic_api_client-22.0.0.dist-info/RECORD,,
61
+ ds_caselaw_marklogic_api_client-22.0.1.dist-info/LICENSE.md,sha256=fGMzyyLuQW-IAXUeDSCrRdsYW536aEWThdbpCjo6ZKg,1108
62
+ ds_caselaw_marklogic_api_client-22.0.1.dist-info/METADATA,sha256=g3BQ1XWePR6qvtg4VFpuy9hhJGFmWHammOcJtnatxC4,4006
63
+ ds_caselaw_marklogic_api_client-22.0.1.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
64
+ ds_caselaw_marklogic_api_client-22.0.1.dist-info/RECORD,,