Skip to content

Commit 7261103

Browse files
committed
typesystem: don't raise exception if conceptAttributes is missing
1 parent 1e286be commit 7261103

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ctakesclient/typesystem.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def from_json(self, source: dict):
166166
self.conceptAttributes = []
167167

168168
# sort list of concepts ensuring same ordering
169-
unsorted = list(UmlsConcept(c) for c in source.get('conceptAttributes'))
169+
unsorted = list(UmlsConcept(c) for c in source.get('conceptAttributes', []))
170170

171171
for c in MatchText.sort_concepts(unsorted):
172172
self.conceptAttributes.append(c)

0 commit comments

Comments
 (0)