From 75467f18acc9c296870444df3268a65d1a6d274d Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Sun, 30 Oct 2022 22:44:28 +0100 Subject: [PATCH] Update mana change --- src/character/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/character/views.py b/src/character/views.py index 983b666..3ab4c6a 100644 --- a/src/character/views.py +++ b/src/character/views.py @@ -32,7 +32,10 @@ def character_health_change(request: WSGIRequest, pk: int) -> HttpResponse: @login_required def character_mana_change(request: WSGIRequest, pk: int) -> HttpResponse: character = get_object_or_404( - Character.objects.only("mana_remaining", "level", "value_intelligence"), pk=pk + Character.objects.only( + "mana_remaining", "level", "value_intelligence", "profile" + ).select_related("profile"), + pk=pk, ) value = get_updated_value(request, character.mana_remaining, character.mana_max) character.mana_remaining = value