Skip to content
Snippets Groups Projects
Commit f5f87f0b authored by Vuillaume's avatar Vuillaume
Browse files

Merge branch 'orcid' into 'master'

fix identifier bug introduced in previous PR

See merge request !252
parents dbd6b15d dbef58be
No related branches found
No related tags found
1 merge request!252fix identifier bug introduced in previous PR
Pipeline #223440 passed
......@@ -47,12 +47,11 @@ def parse_person_schema_property(person_property, contributor_field):
# author ID in CodeMeta can be anything, not only ORCID
# if format is 0000-0000-0000-0000, it is assumed to be an ORCID
if "identifier" in person_property and (
"orcid.org/" in person_property["identifier"]
or re.match(r'^\d{4}-\d{4}-\d{4}-\d{3}[0-9X]$', person_property["identifier"])
if "@id" in person_property and (
"orcid.org/" in person_property["@id"] or re.match(r'^\d{4}-\d{4}-\d{4}-\d{3}[0-9X]$', person_property["@id"])
):
# reformat "https://orcid.org/0000-0002-5686-2078" to "0000-0002-5686-2078"
zenodo_person['orcid'] = person_property["identifier"].split('orcid.org/')[-1]
zenodo_person['orcid'] = person_property["@id"].split('orcid.org/')[-1]
if "affiliation" in person_property:
zenodo_person['affiliation'] = person_property['affiliation']['name']
......
......@@ -13,7 +13,7 @@
"name": "Author-and-Creator-same-person-affiliation"
},
"email": "Author-and-Creator-same-person-email",
"identifier": "Author-and-Creator-same-person-identifier"
"@id": "Author-and-Creator-same-person-identifier"
}
],
"creator": {
......@@ -25,7 +25,7 @@
"name": "Author-and-Creator-same-person-affiliation"
},
"email": "Author-and-Creator-same-person-email",
"identifier": "Author-and-Creator-same-person-identifier"
"@id": "Author-and-Creator-same-person-identifier"
},
"maintainer": {
"@type": "Person",
......@@ -35,7 +35,7 @@
"@type": "Organization",
"name": "Maintainer-affiliation"
},
"identifier": "https://orcid.org/0000-0000-0000-0000"
"@id": "https://orcid.org/0000-0000-0000-0000"
},
"contributor": [
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment