From 5df6275ff2fbc75ebc1dc4108401747936c3cbf6 Mon Sep 17 00:00:00 2001 From: Kevin Schaper Date: Mon, 23 Oct 2023 14:19:30 -0700 Subject: [PATCH] Change disease mode of inheritance query to only look at direct associations (#432) This is causing some pages to not render, I specifically saw the error for MONDO:0017314 in the logs --- .../src/monarch_py/implementations/solr/solr_implementation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/monarch_py/implementations/solr/solr_implementation.py b/backend/src/monarch_py/implementations/solr/solr_implementation.py index 8445ea741..2a78c5e49 100644 --- a/backend/src/monarch_py/implementations/solr/solr_implementation.py +++ b/backend/src/monarch_py/implementations/solr/solr_implementation.py @@ -83,7 +83,7 @@ def get_entity(self, id: str, extra: bool) -> Optional[Union[Node, Entity]]: node = Node(**solr_document) if "biolink:Disease" in node.category: mode_of_inheritance_associations = self.get_associations( - subject=id, predicate="biolink:has_mode_of_inheritance", offset=0 + subject=id, predicate="biolink:has_mode_of_inheritance", direct=True, offset=0 ) if mode_of_inheritance_associations is not None and len(mode_of_inheritance_associations.items) == 1: node.inheritance = self._get_associated_entity(mode_of_inheritance_associations.items[0], node)