make purchase price a float
All checks were successful
Django CI/CD / test (push) Successful in 1m7s
Django CI/CD / build-and-push (push) Successful in 2m8s

This commit is contained in:
2024-10-04 11:36:46 +02:00
parent 7f5a1889f3
commit 7ec622a38a
5 changed files with 27 additions and 4 deletions

View File

@ -60,3 +60,7 @@ def generate_split_ranges(
except IndexError:
end = len(value_list)
yield (value_list[start], value_list[end - 1])
def format_float_or_int(number: int | float):
return int(number) if float(number).is_integer() else f"{number:03.2f}"