From ff4177ca909aa000e80f287bc059c84a73629bf2 Mon Sep 17 00:00:00 2001 From: alejandromumo Date: Fri, 22 Nov 2024 09:30:17 +0100 Subject: [PATCH] codemeta: use identifiers field --- site/zenodo_rdm/serializers/codemeta.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/site/zenodo_rdm/serializers/codemeta.py b/site/zenodo_rdm/serializers/codemeta.py index 86040ab3..7c6f4085 100644 --- a/site/zenodo_rdm/serializers/codemeta.py +++ b/site/zenodo_rdm/serializers/codemeta.py @@ -12,15 +12,15 @@ from idutils import normalize_doi, to_url from invenio_rdm_records.contrib.codemeta.processors import CodemetaDumper from invenio_rdm_records.resources.serializers.codemeta.schema import CodemetaSchema -from marshmallow import missing +from marshmallow import fields, missing class ZenodoCodemetaSchema(CodemetaSchema): """Zenodo Codemeta schema.""" - id_ = missing + identifier = fields.Method("get_identifiers") - def get_id(self, obj): + def get_identifiers(self, obj): """Compute the "identifier". It uses the DOI expressed as a URL and the Software Hash ID as `swhid`.