From 5542c1dc4392045d074854134186e1b59f6a8cd9 Mon Sep 17 00:00:00 2001 From: James Harries Date: Tue, 26 Nov 2024 14:25:51 +0000 Subject: [PATCH] FCL-448 | add some types to search response --- judgments/feeds.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/judgments/feeds.py b/judgments/feeds.py index 050ea47e8..8af3b3f11 100644 --- a/judgments/feeds.py +++ b/judgments/feeds.py @@ -5,6 +5,7 @@ from caselawclient.client_helpers.search_helpers import ( search_judgments_and_parse_response, ) +from caselawclient.responses.search_response import SearchResponse from caselawclient.responses.search_result import SearchResult from caselawclient.search_parameters import SearchParameters from django.contrib.syndication.views import Feed @@ -178,7 +179,7 @@ def render_html(self, request): search = self.get_object(request) - search_response = search.get("search_response") + search_response: SearchResponse = search.get("search_response", {}) context["search_results"] = search_response.results