From 77930649b16245408434be380550844088f82642 Mon Sep 17 00:00:00 2001 From: Alexander Minges Date: Tue, 20 May 2025 13:27:54 +0200 Subject: [PATCH] Fix affiliation field name in Person class --- doi2dataset.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doi2dataset.py b/doi2dataset.py index fa0d711..9cbd676 100755 --- a/doi2dataset.py +++ b/doi2dataset.py @@ -279,7 +279,7 @@ class CompoundMetadataField( class Institution: """ Represents an institution or organization. - + Attributes: display_name (str): The name of the institution. ror (str): Research Organization Registry identifier (optional). @@ -290,7 +290,7 @@ class Institution: def affiliation_field(self) -> PrimitiveMetadataField: """ Create a metadata field for the affiliation. - + Returns: PrimitiveMetadataField: A metadata field representing the institution, using ROR ID when available. @@ -411,7 +411,7 @@ class Person: if isinstance(self.affiliation, Institution): affiliation_field = self.affiliation.affiliation_field() else: - affiliation_field = PrimitiveMetadataField("authorAffiliation", False, self.affiliation) + affiliation_field = PrimitiveMetadataField("datasetContactAffiliation", False, self.affiliation) return [ PrimitiveMetadataField("datasetContactName", False, self.format_name()), @@ -449,7 +449,7 @@ class Abstract: def __post_init__(self): """ Validate that the abstract source is one of the allowed values. - + Raises: ValueError: If source is not one of the allowed values. """