From 70c558654d76624db0f790f5f543f53cb2df1d77 Mon Sep 17 00:00:00 2001 From: Ronald Krist Date: Mon, 2 Dec 2024 13:42:48 +0100 Subject: [PATCH] format --- oarepo_requests/resolvers/ui.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/oarepo_requests/resolvers/ui.py b/oarepo_requests/resolvers/ui.py index 9b0477d..8f33695 100644 --- a/oarepo_requests/resolvers/ui.py +++ b/oarepo_requests/resolvers/ui.py @@ -383,7 +383,9 @@ def _search_many( f"No service found for handling reference type {self.reference_type}" ) extra_filter = dsl.Q("terms", **{"id": list(ids)}) - return service.search(identity, extra_filter=extra_filter).to_dict()["hits"]["hits"] + return service.search(identity, extra_filter=extra_filter).to_dict()["hits"][ + "hits" + ] @override def _search_one( @@ -544,6 +546,7 @@ def _get_entity_ui_representation( links=self._extract_links_from_resolved_reference(entity), ) + class KeywordUIEntityResolver(OARepoUIResolver): keyword = None @@ -581,6 +584,7 @@ def _search_one( """ return {self.keyword: _id} + class AutoApproveUIEntityResolver(KeywordUIEntityResolver): keyword = "auto_approve" @@ -601,4 +605,3 @@ def _get_entity_ui_representation( label=_("Auto approve"), links={}, ) -