Properly display non-game type names
This commit is contained in:
parent
57184ceea0
commit
c738245783
|
@ -44,6 +44,7 @@ def list_purchases(request: HttpRequest) -> HttpResponse:
|
|||
"data": {
|
||||
"columns": [
|
||||
"Name",
|
||||
"Type",
|
||||
"Platform",
|
||||
"Price",
|
||||
"Currency",
|
||||
|
@ -67,8 +68,13 @@ def list_purchases(request: HttpRequest) -> HttpResponse:
|
|||
),
|
||||
),
|
||||
],
|
||||
truncate_with_popover(purchase.edition.game.name),
|
||||
truncate_with_popover(
|
||||
purchase.edition.game.name
|
||||
if purchase.type == "game"
|
||||
else f"{purchase.edition.game.name} ({purchase.name})"
|
||||
),
|
||||
),
|
||||
purchase.get_type_display(),
|
||||
purchase.platform,
|
||||
purchase.price,
|
||||
purchase.price_currency,
|
||||
|
|
Loading…
Reference in New Issue