Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronald Krist committed Dec 2, 2024
1 parent d67cfe8 commit 70c5586
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions oarepo_requests/resolvers/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -544,6 +546,7 @@ def _get_entity_ui_representation(
links=self._extract_links_from_resolved_reference(entity),
)


class KeywordUIEntityResolver(OARepoUIResolver):
keyword = None

Expand Down Expand Up @@ -581,6 +584,7 @@ def _search_one(
"""
return {self.keyword: _id}


class AutoApproveUIEntityResolver(KeywordUIEntityResolver):
keyword = "auto_approve"

Expand All @@ -601,4 +605,3 @@ def _get_entity_ui_representation(
label=_("Auto approve"),
links={},
)

0 comments on commit 70c5586

Please sign in to comment.