Skip to content

Commit

Permalink
Revert back is_type logic
Browse files Browse the repository at this point in the history
  • Loading branch information
atuonufure committed Jan 10, 2024
1 parent e4e3a12 commit 7605e09
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions fhirpathpy/engine/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -839,13 +839,10 @@ def is_type(type_name, super_type):
if type_name == super_type:
return True

if TypeInfo.model is not None:
parent_type = TypeInfo.model.get("type2Parent", {}).get(type_name)
if parent_type is None:
parent_type = TypeInfo.model.get("path2Type", {}).get(type_name)
type_name = parent_type
else:
return False
# TODO: Double check it
type_name = TypeInfo.model.get("type2Parent").get(type_name) or TypeInfo.model.get(
"path2Type"
).get(type_name)

return False

Expand Down

0 comments on commit 7605e09

Please sign in to comment.