Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix percolator deletion for lazy strings and release v2.2.3 #241

Merged
merged 2 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
Changes
=======

Version v2.2.3 (released 2024-09-25)

- percolator: allow lazy strings from config for deletions

Version v2.2.2 (released 2024-09-11)

- percolator: allow lazy strings from config
Expand Down
2 changes: 1 addition & 1 deletion invenio_oaiserver/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,6 @@
from .ext import InvenioOAIServer
from .proxies import current_oaiserver

__version__ = "2.2.2"
__version__ = "2.2.3"

__all__ = ("__version__", "InvenioOAIServer", "current_oaiserver")
3 changes: 2 additions & 1 deletion invenio_oaiserver/percolator.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ def _new_percolator(spec, search_pattern):

def _delete_percolator(spec, search_pattern):
"""Delete percolator associated with the removed/updated oaiset."""
oai_records_index = current_app.config["OAISERVER_RECORD_INDEX"]
# NOTE: We call `str` so that we can also handle lazy values (e.g. a LocalProxy)
oai_records_index = str(current_app.config["OAISERVER_RECORD_INDEX"])
# Create the percolator doc_type in the existing index for >= ES5
for index, mapping_path in current_search.mappings.items():
# Skip indices/mappings not used by OAI-PMH
Expand Down
Loading