hubmapconsortium / search-api

HuBMAP search service and associated pieces to create an index
https://search.api.hubmapconsortium.org
MIT License
2 stars 2 forks source link

Handle missing organs in portal transformation #771

Closed lchoy closed 5 months ago

lchoy commented 5 months ago

This PR addresses the occurrence of "IndexError: list index out of range" when a sample or dataset entity is missing associations to an organ. When this condition occurs, a "RuntimeWarning: Invalid document" message will be logged to state that the document is "Missing or empty 'origin_samples'." The entity will not be added to the portal index to prevent issues on the UI. These entities will be viewable in the ingest portal or data dashboard.