From 3226abe9eb6be07e2489b97d6e8b9ac9575b6d00 Mon Sep 17 00:00:00 2001 From: Ben Gyori Date: Tue, 6 Feb 2018 14:01:19 -0500 Subject: [PATCH] Handle missing entity reference --- indra/sources/biopax/processor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/sources/biopax/processor.py b/indra/sources/biopax/processor.py index 398067eba8..b5bfb555d6 100644 --- a/indra/sources/biopax/processor.py +++ b/indra/sources/biopax/processor.py @@ -1112,7 +1112,7 @@ def _get_chebi_id(bpe): def _get_rna_grounding(bpe): bp_entref = BiopaxProcessor._get_entref(bpe) if bp_entref is None: - return None + return {} xrefs = bp_entref.getXref().toArray() rna_grounding = {} for xr in xrefs: @@ -1135,7 +1135,7 @@ def _get_rna_grounding(bpe): def _get_chemical_grounding(bpe): bp_entref = BiopaxProcessor._get_entref(bpe) if bp_entref is None: - return None + return {} xrefs = bp_entref.getXref().toArray() chemical_grounding = {} for xr in xrefs: