We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a674a83 commit 5a4b5fbCopy full SHA for 5a4b5fb
caltechdata_api/caltechdata_edit.py
@@ -211,6 +211,17 @@ def caltechdata_edit(
211
"provider": "datacite",
212
"client": "datacite",
213
}
214
+ # If we are making a new version, we only want to look for custom DOIs
215
+ if version == True and "identifiers" in metadata:
216
+ for identifier in metadata["identifiers"]:
217
+ if identifier["identifierType"] == "DOI":
218
+ doi = identifier["identifier"]
219
+ prefix = doi.split("/")[0]
220
+ if prefix != repo_prefix:
221
+ pids["doi"] = {
222
+ "identifier": doi,
223
+ "provider": "external",
224
+ }
225
226
# If no metadata is provided, use existing. Otherwise customize provided
227
# metadata
0 commit comments