Skip to content

Commit

Permalink
Merge branch 'main' into 725-core-functionality-of-data_objectsstudys…
Browse files Browse the repository at this point in the history
…tudy_id-endpoint-is-not-being-tested
  • Loading branch information
dwinston committed Dec 19, 2024
2 parents 1358578 + 410856f commit eeaa555
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions nmdc_runtime/api/endpoints/find.py
Original file line number Diff line number Diff line change
@@ -243,7 +243,7 @@ def process_informed_by_docs(doc, collected_objects, unique_ids):

# Process `DataGeneration` type documents linked by `was_informed_by`
if not has_output and any(
t in dg_descendants for t in doc.get("type", [])
t in dg_descendants for t in doc.get("_type_and_ancestors", [])
):
process_informed_by_docs(
doc, collected_data_objects, unique_ids
@@ -257,7 +257,9 @@ def process_informed_by_docs(doc, collected_objects, unique_ids):
if get_classname_from_typecode(op) != "DataObject"
)

if any(t in dg_descendants for t in doc.get("type", [])):
if any(
t in dg_descendants for t in doc.get("_type_and_ancestors", [])
):
process_informed_by_docs(
doc, collected_data_objects, unique_ids
)

0 comments on commit eeaa555

Please sign in to comment.