From 9476ad7d89bdeb0c6475a9b2461334ec423aa9f6 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Tue, 5 Mar 2024 19:00:39 +0100 Subject: [PATCH] Update views.py --- src/party/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/party/views.py b/src/party/views.py index e987b5f..d8bda9b 100644 --- a/src/party/views.py +++ b/src/party/views.py @@ -96,7 +96,7 @@ def party_add_effect(request, pk): @require_GET @login_required def party_increase_rounds(request, pk): - party = get_object_or_404(Party.objects.managed_by(request.user), pk=pk) + party = get_object_or_404(Party.objects.played_or_mastered_by(request.user), pk=pk) party.effects.increase_rounds() return render(request, "party/snippets/effects.html", {"party": party}) @@ -104,7 +104,7 @@ def party_increase_rounds(request, pk): @require_GET @login_required def party_decrease_rounds(request, pk): - party = get_object_or_404(Party.objects.managed_by(request.user), pk=pk) + party = get_object_or_404(Party.objects.played_or_mastered_by(request.user), pk=pk) party.effects.decrease_rounds() return render(request, "party/snippets/effects.html", {"party": party}) @@ -112,7 +112,7 @@ def party_decrease_rounds(request, pk): @require_GET @login_required def party_delete_effect(request, pk, effect_pk): - party = get_object_or_404(Party.objects.managed_by(request.user), pk=pk) + party = get_object_or_404(Party.objects.played_or_mastered_by(request.user), pk=pk) BattleEffect.objects.filter(pk=effect_pk).delete() return render(request, "party/snippets/effects.html", {"party": party})