diff --git a/core/feed/acquisition.py b/core/feed/acquisition.py index c439146033..054f28cbc9 100644 --- a/core/feed/acquisition.py +++ b/core/feed/acquisition.py @@ -14,6 +14,7 @@ Type, ) +from dependency_injector.wiring import Provide, inject from sqlalchemy.orm import Query, Session from api.problem_details import NOT_FOUND_ON_REMOTE @@ -665,6 +666,7 @@ def single_entry( return None @classmethod + @inject def groups( cls, _db: Session, @@ -674,7 +676,7 @@ def groups( annotator: LibraryAnnotator, pagination: Optional[Pagination] = None, facets: Optional[FacetsWithEntryPoint] = None, - search_engine: Optional[ExternalSearchIndex] = None, + search_engine: ExternalSearchIndex = Provide["search.index"], search_debug: bool = False, ) -> OPDSAcquisitionFeed: """Internal method called by groups() when a grouped feed diff --git a/core/service/container.py b/core/service/container.py index 127c956570..07e8e08244 100644 --- a/core/service/container.py +++ b/core/service/container.py @@ -24,6 +24,7 @@ class Services(DeclarativeContainer): "api.odl", "api.overdrive", "core.feed.annotator.circulation", + "core.feed.acquisition", "core.lane", "core.metadata_layer", "core.model.collection",