-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use integer cents in AMAP / Tombola #366
base: main
Are you sure you want to change the base?
Conversation
[ticket.pack_ticket.price / ticket.pack_ticket.pack_size for ticket in tickets] | ||
) | ||
)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The goal of this PR is to avoid imprecision errors. Maybe there is a way to avoid dividing values before converting to int
Nice one ! You will need to look into migration files to convert float euro database values to new int cent values |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #366 +/- ##
=======================================
Coverage 78.26% 78.26%
=======================================
Files 76 76
Lines 5351 5351
=======================================
Hits 4188 4188
Misses 1163 1163 ☔ View full report in Codecov by Sentry. |
Description
I change all the amounts in cents (integer) to avoid rounding issues.