Skip to content

Commit

Permalink
codemeta: use identifiers field
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandromumo authored and slint committed Nov 28, 2024
1 parent d6a7fe5 commit ff4177c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions site/zenodo_rdm/serializers/codemeta.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down

0 comments on commit ff4177c

Please sign in to comment.