build(metaUpdater): Fix Adding new "creators" to .zenodo.json

When adding new "creators" to .zenodo.json, the
kwargs['contributor_type'] is not set at all.

Instead use normal keyword handling with defaults.
This commit is contained in:
Christian Tacke 2022-09-02 12:28:19 +02:00 committed by Dennis Klein
parent 832c83247a
commit fc82f262dc

View File

@ -119,11 +119,11 @@ class ZenodoManipulator(Manipulator):
return None return None
@staticmethod @staticmethod
def update_person_entry(entry, matchdict, **kwargs): def update_person_entry(entry, matchdict, contributor_type=None):
if entry is None: if entry is None:
entry = OrderedDict() entry = OrderedDict()
if kwargs['contributor_type']: if contributor_type:
entry['type'] = kwargs['contributor_type'] entry['type'] = contributor_type
for field in ('name', 'orcid'): for field in ('name', 'orcid'):
val = matchdict.get(field, None) val = matchdict.get(field, None)
if val is not None: if val is not None: