diff --git a/metadata_catalogue/datasets/libs/darwincore/deserializer.py b/metadata_catalogue/datasets/libs/darwincore/deserializer.py index 02466b5..ba1fef8 100644 --- a/metadata_catalogue/datasets/libs/darwincore/deserializer.py +++ b/metadata_catalogue/datasets/libs/darwincore/deserializer.py @@ -172,7 +172,7 @@ def to_metadata(xml_path: pathlib.Path, dataset: Dataset): if funding := project.find("funding"): for org in funding.find_all("para"): o, _ = Organization.objects.get_or_create(name=org.text) - org_role = OrganizationRole.objects.create( + org_role, _ = OrganizationRole.objects.get_or_create( organization=o, metadata=metadata, role=OrganizationRole.RoleType.FUNDING,