Skip to content

Commit ec5f1b3

Browse files
Update customize_schema.py
1 parent a80ea5a commit ec5f1b3

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

caltechdata_api/customize_schema.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -508,11 +508,11 @@ def validate_metadata(json_record):
508508
if creator["nameType"] == "Organizational":
509509
if "name" not in creator:
510510
errors.append("Each organizational 'creator' must have 'name'.")
511-
else:
512-
if "familyName" not in creator:
513-
errors.append(
514-
"Each 'creator' must have a 'familyName' or have type Organizational"
515-
)
511+
else:
512+
if "familyName" not in creator:
513+
errors.append(
514+
"Each 'creator' must have a 'familyName' or have type Organizational"
515+
)
516516
if "affiliation" in creator:
517517
if not isinstance(creator["affiliation"], list):
518518
errors.append("'affiliation' in 'creators' should be a list.")
@@ -539,11 +539,11 @@ def validate_metadata(json_record):
539539
errors.append(
540540
"Each organizational 'contributor' must have 'name'."
541541
)
542-
else:
543-
if "familyName" not in contributor:
544-
errors.append(
545-
"Each 'contributor' must have a 'familyName' or have type Organizational"
546-
)
542+
else:
543+
if "familyName" not in contributor:
544+
errors.append(
545+
"Each 'contributor' must have a 'familyName' or have type Organizational"
546+
)
547547
if "affiliation" in contributor:
548548
if not isinstance(contributor["affiliation"], list):
549549
errors.append(

0 commit comments

Comments
 (0)