From 2e45c92b78ebfd1a199b418b01c5391ef6ad82c0 Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Wed, 5 Jul 2023 15:40:27 +0200 Subject: [PATCH] Update construct.py --- mira/dkg/construct.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mira/dkg/construct.py b/mira/dkg/construct.py index e1a62dd0f..35b0c672a 100644 --- a/mira/dkg/construct.py +++ b/mira/dkg/construct.py @@ -464,7 +464,8 @@ def construct( property_values="", xref_types="", # TODO synonym_types=";".join( - synonym.type.curie for synonym in term.synonyms or [] + synonym.type.curie if synonym.type is not None else "skos:exactMatch" + for synonym in term.synonyms or [] ), ) for parent in term.parents: @@ -979,7 +980,8 @@ def get_node_info(term: pyobo.Term, type: EntityType = "class"): property_values="", xref_types="", synonym_types=";".join( - synonym.type.curie for synonym in term.synonyms or [] + synonym.type.curie if synonym.type is not None else "skos:exactMatch" + for synonym in term.synonyms or [] ), )