From 0174bcd0cdac48bc5dfe4d04a08c13f39ad4ac7e Mon Sep 17 00:00:00 2001 From: yashlamba Date: Wed, 11 Oct 2023 09:58:09 +0200 Subject: [PATCH] oai: rename format etree methods logically --- invenio_rdm_records/oai.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/invenio_rdm_records/oai.py b/invenio_rdm_records/oai.py index 9c665dd25..a1c3c1391 100644 --- a/invenio_rdm_records/oai.py +++ b/invenio_rdm_records/oai.py @@ -36,7 +36,7 @@ def dublincore_etree(pid, record, **serializer_kwargs): return simpledc.dump_etree(obj) -def oai_marcxml_etree(pid, record): +def marcxml_etree(pid, record): """OAI MARCXML format for OAI-PMH.""" item = current_rdm_records_service.oai_result_item(g.identity, record["_source"]) # TODO: MARCXMLSerializer should directly be able to dump an etree instead @@ -45,7 +45,7 @@ def oai_marcxml_etree(pid, record): return etree.fromstring(MARCXMLSerializer().serialize_object(item.to_dict())) -def oai_dcat_etree(pid, record): +def dcat_etree(pid, record): """OAI DCAT-AP format for OAI-PMH.""" item = current_rdm_records_service.oai_result_item(g.identity, record["_source"]) # TODO: Ditto. See https://github.com/inveniosoftware/flask-resources/issues/117