make purchase price a float
This commit is contained in:
@ -25,7 +25,7 @@ from common.time import (
|
||||
local_strftime,
|
||||
timeformat,
|
||||
)
|
||||
from common.utils import safe_division, truncate
|
||||
from common.utils import format_float_or_int, safe_division, truncate
|
||||
from games.forms import GameForm
|
||||
from games.models import Edition, Game, Purchase, Session
|
||||
from games.views.general import use_custom_redirect
|
||||
@ -247,7 +247,7 @@ def view_game(request: HttpRequest, game_id: int) -> HttpResponse:
|
||||
),
|
||||
purchase.get_type_display(),
|
||||
purchase.date_purchased.strftime(dateformat),
|
||||
f"{purchase.price} {purchase.price_currency}",
|
||||
f"{format_float_or_int(purchase.price)} {purchase.price_currency}",
|
||||
render_to_string(
|
||||
"cotton/button_group.html",
|
||||
{
|
||||
|
Reference in New Issue
Block a user