File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -504,10 +504,15 @@ def validate_metadata(json_record):
504504 for creator in json_record ["creators" ]:
505505 if not isinstance (creator , dict ):
506506 errors .append ("Each 'creator' must be a dictionry" )
507- if "nameType" in creator :
508- if creator ["nameType" ] != "Organizational" :
507+ if "nameType" in creator :
508+ if creator ["nameType" ] == "Organizational" :
509+ if "name" not in creator :
510+ errors .append ("Each organizational 'creator' must have 'name'." )
511+ else :
509512 if "familyName" not in creator :
510- errors .append ("Each 'creator' must have a 'familyName' or have type 'Organizational'." )
513+ errors .append (
514+ "Each 'creator' must have a 'familyName' or have type Organizational"
515+ )
511516 if "affiliation" in creator :
512517 if not isinstance (creator ["affiliation" ], list ):
513518 errors .append ("'affiliation' in 'creators' should be a list." )
You can’t perform that action at this time.
0 commit comments