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 a37781475b

View File

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