Skip to content

Commit

Permalink
Add check for None in datetime_equality
Browse files Browse the repository at this point in the history
  • Loading branch information
atuonufure committed Aug 28, 2023
1 parent 33fad15 commit 37b4e9a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fhirpathpy/engine/invocations/equality.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ def equivalence(ctx, x, y):
def datetime_equality(ctx, x, y):
datetime_x = x[0]
datetime_y = y[0]
if datetime_x is None or datetime_y is None:
return False
if type(datetime_x) not in DATETIME_NODES_LIST:
v_x = util.get_data(datetime_x)
datetime_x = nodes.FP_DateTime(v_x) or nodes.FP_Time(v_x)
Expand Down

0 comments on commit 37b4e9a

Please sign in to comment.