Skip to content

Commit

Permalink
Handle nan values
Browse files Browse the repository at this point in the history
  • Loading branch information
CannonLock committed Feb 15, 2024
1 parent 7594398 commit 46b7261
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/models/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def transform_str_to_int(cls, v):


class PolygonResponseModel(PolygonModel):
@field_validator("confidence")
@field_validator("confidence", "t_age", "b_age")
def change_nan_to_none(cls, v):
if type(v) == float and isnan(v):
return None
Expand Down

0 comments on commit 46b7261

Please sign in to comment.