@@ -47,9 +47,7 @@ def get_search(self) -> SearchType:
4747 """Get search instance."""
4848 if hasattr (self .document_class , "search" ):
4949 return self .document_class .search () # type: ignore
50- raise AttributeError (
51- f"{ self .document_class .__name__ } does not have a search method"
52- )
50+ raise AttributeError (f"{ self .document_class .__name__ } does not have a search method" )
5351
5452 def get (self , request : HttpRequest ) -> Response :
5553 """Handle GET request and return paginated search results."""
@@ -99,10 +97,10 @@ def get(self, request: HttpRequest) -> Response:
9997 aggregations .pop ("metadata" )
10098 for agg in metadata_aggregations :
10199 label : str = agg ["key" ]["metadata_label" ]
102- value : str = agg ["key" ].get ("metadata_value" , "" )
103- if label not in aggregations :
104- aggregations [label ] = {}
105- aggregations [label ][value ] = agg ["doc_count" ]
100+ value : str = agg ["key" ].get ("metadata_value" , "" )
101+ if label not in aggregations :
102+ aggregations [label ] = {}
103+ aggregations [label ][value ] = agg ["doc_count" ]
106104
107105 if "catalogs" in aggregations :
108106 aggregations .pop ("catalogs" )
@@ -170,9 +168,7 @@ def get(self, request: HttpRequest) -> Response:
170168 aggregations ["running_status" ][agg ["key" ]] = agg ["doc_count" ]
171169
172170 if "is_individual_usecase" in aggregations :
173- is_individual_usecase_agg = aggregations ["is_individual_usecase" ][
174- "buckets"
175- ]
171+ is_individual_usecase_agg = aggregations ["is_individual_usecase" ]["buckets" ]
176172 aggregations .pop ("is_individual_usecase" )
177173 aggregations ["is_individual_usecase" ] = {}
178174 for agg in is_individual_usecase_agg :
0 commit comments