Skip to content

Commit

Permalink
[BUG] Fix command numeric conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
JGarciaCondado committed Sep 20, 2024
1 parent 6d51798 commit f7d3dde
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ageml/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ def convert(value):
converted_value = False
else:
try:
converted_value = float(value)
# If there is . treat as float if not as int
if "." in value:
converted_value = float(value)
else:
converted_value = int(value)
except ValueError:
# If the value cannot be converted to a float, keep it as a string
converted_value = value
Expand Down

0 comments on commit f7d3dde

Please sign in to comment.