diff --git a/games/templates/stats.html b/games/templates/stats.html
index d2dd1c4..3faf56c 100644
--- a/games/templates/stats.html
+++ b/games/templates/stats.html
@@ -136,7 +136,13 @@
{{ purchase.edition.name }}
+ href="{% url 'edit_purchase' purchase.id %}">
+ {% if purchase.type == 'dlc' %}
+ {{ purchase.name }} ({{ purchase.edition.name }} DLC)
+ {% else %}
+ {{ purchase.edition.name }}
+ {% endif %}
+
|
{{ purchase.date_finished | date:"d/m/Y" }} |
diff --git a/games/templates/view_game.html b/games/templates/view_game.html
index b28cba5..c8fb77a 100644
--- a/games/templates/view_game.html
+++ b/games/templates/view_game.html
@@ -61,7 +61,6 @@
{% url 'start_game_session' game.id as add_session_link %}
{% include 'components/button.html' with title="Start new session" text="New" link=add_session_link %}
and Notes ({{ sessions_with_notes_count }})
-
{% for session in sessions %}
diff --git a/games/views.py b/games/views.py
index 6593173..9f92d9b 100644
--- a/games/views.py
+++ b/games/views.py
@@ -2,7 +2,7 @@ from datetime import datetime, timedelta
from typing import Any, Callable
from django.core.exceptions import ObjectDoesNotExist
-from django.db.models import Count, F, Prefetch, Sum
+from django.db.models import Count, F, Prefetch, Q, Sum
from django.db.models.functions import TruncDate
from django.http import (
HttpRequest,
@@ -344,8 +344,8 @@ def stats(request, year: int = 0):
this_year_purchases_unfinished = this_year_purchases_without_refunded.filter(
date_finished__isnull=True
).filter(
- type=Purchase.GAME
- ) # do not count DLC etc.
+ Q(type=Purchase.GAME) | Q(type=Purchase.DLC)
+ ) # do not count battle passes etc.
this_year_purchases_unfinished_percent = int(
safe_division(