From b8187c32b1c8cdc5c7b28cb6f69a2b3b2d1d49cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Tue, 12 May 2026 12:48:14 +0200 Subject: [PATCH] Always abandon refunded games --- .../templates/partials/refund_purchase_confirmation.html | 9 +++------ games/views/purchase.py | 7 +++---- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/games/templates/partials/refund_purchase_confirmation.html b/games/templates/partials/refund_purchase_confirmation.html index cd3afb1..bf8ed4b 100644 --- a/games/templates/partials/refund_purchase_confirmation.html +++ b/games/templates/partials/refund_purchase_confirmation.html @@ -7,12 +7,9 @@

{% csrf_token %} -
- -
+

+ Games will be marked as abandoned. +

Refund Cancel diff --git a/games/views/purchase.py b/games/views/purchase.py index add7a75..78aa53d 100644 --- a/games/views/purchase.py +++ b/games/views/purchase.py @@ -212,10 +212,9 @@ def refund_purchase_confirmation( def refund_purchase(request: HttpRequest, purchase_id: int) -> HttpResponse: purchase = get_object_or_404(Purchase, id=purchase_id) - if request.POST.get("set_abandoned"): - for game in purchase.games.all(): - game.status = Game.Status.ABANDONED - game.save() + for game in purchase.games.all(): + game.status = Game.Status.ABANDONED + game.save() purchase.refund()