From 2fa125c0635276e956d799ad659a6bd4438e851a Mon Sep 17 00:00:00 2001 From: alejandromumo Date: Fri, 8 Mar 2024 14:39:36 +0100 Subject: [PATCH] fixtures: added subject type creation on load --- invenio_rdm_records/fixtures/vocabularies.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/invenio_rdm_records/fixtures/vocabularies.py b/invenio_rdm_records/fixtures/vocabularies.py index d098decc9..98591f1c8 100644 --- a/invenio_rdm_records/fixtures/vocabularies.py +++ b/invenio_rdm_records/fixtures/vocabularies.py @@ -387,6 +387,10 @@ def __init__(self, service_str, directory, id_, entry): # Template methods def pre_load(self, identity, ignore): """Actions taken before iteratively creating records.""" + # Create the type first, if needed + super().pre_load(identity, ignore) + + # Add schemes for scheme in self.schemes(): id_ = f"{self._id}.{scheme['id']}" if id_ not in ignore: