Skip to content

Commit 865c6d2

Browse files
committed
Handle records with rights list array
1 parent 84174bc commit 865c6d2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

caltechdata_api/decustomize_schema.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ def decustomize_standard(json_record, pass_emails, pass_media, pass_owner):
139139

140140
# change rightsList into array
141141
if "rightsList" in json_record:
142-
json_record["rightsList"] = [json_record["rightsList"]]
142+
if not isinstance(json_record["rightsList"], list):
143+
json_record["rightsList"] = [json_record["rightsList"]]
143144

144145
# Handle file info
145146
if pass_media == False:

0 commit comments

Comments
 (0)