Skip to content

Commit b095776

Browse files
committed
Add error for records without DOI
1 parent 46f627e commit b095776

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

caltechdata_api/decustomize_schema.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ def decustomize_schema(
2929
"identifierType": "DOI",
3030
}
3131
del json_record["doi"]
32+
#Fail out if a DOI is not present
33+
else:
34+
raise ValueError(f'Error: Record does not have a DOI {json_record}')
3235

3336
# Extract title
3437
if "title" in json_record:

0 commit comments

Comments
 (0)