From 1c73268258757f719e5bdb3d930ece4a7f1ccfa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Tue, 10 Sep 2024 14:50:49 +0200 Subject: [PATCH] redirect to purchase list after modifying purchase --- games/views/purchase.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/games/views/purchase.py b/games/views/purchase.py index 0d1e467..0ebddf3 100644 --- a/games/views/purchase.py +++ b/games/views/purchase.py @@ -204,7 +204,7 @@ def edit_purchase(request: HttpRequest, purchase_id: int) -> HttpResponse: def delete_purchase(request: HttpRequest, purchase_id: int) -> HttpResponse: purchase = get_object_or_404(Purchase, id=purchase_id) purchase.delete() - return redirect("list_sessions") + return redirect("list_purchases") @login_required @@ -212,7 +212,7 @@ def drop_purchase(request: HttpRequest, purchase_id: int) -> HttpResponse: purchase = get_object_or_404(Purchase, id=purchase_id) purchase.date_dropped = timezone.now() purchase.save() - return redirect("list_sessions") + return redirect("list_purchases") @login_required @@ -220,7 +220,7 @@ def refund_purchase(request: HttpRequest, purchase_id: int) -> HttpResponse: purchase = get_object_or_404(Purchase, id=purchase_id) purchase.date_refunded = timezone.now() purchase.save() - return redirect("list_sessions") + return redirect("list_purchases") def related_purchase_by_edition(request: HttpRequest) -> HttpResponse: