Skip to content

Commit

Permalink
fix ingest script for projects
Browse files Browse the repository at this point in the history
  • Loading branch information
jarosenb committed Jul 25, 2024
1 parent e6ba3ef commit a9e1142
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ def ingest_entities_by_name(name):
entities = iterate_entities(name)
for entity in entities:
schema_model = SCHEMA_MAPPING[entity["name"]]
if entity["value"].get("fileObjs"):
entity["value"]["fileObjs"] = [
e for e in entity["value"]["fileObjs"] if e.get("path", None)
]
try:
value_model = schema_model.model_validate(entity["value"])
except ValidationError as err:
Expand Down Expand Up @@ -124,7 +128,6 @@ def ingest_graphs():
def fix_authors(meta: ProjectMetadata):
"""Ensure that authors contain complete name/institution information."""
base_project = meta.base_project
print(meta.project_id)
def get_complete_author(partial_author):
if partial_author.get("name") and not partial_author.get("guest"):
author_info = next(
Expand Down

0 comments on commit a9e1142

Please sign in to comment.