mirror of
https://github.com/Crocmagnon/charasheet.git
synced 2024-11-05 06:13:55 +01:00
Fix typing
This commit is contained in:
parent
f8f546679c
commit
4a88db929b
1 changed files with 4 additions and 2 deletions
|
@ -221,7 +221,9 @@ def character_luck_points_change(request, pk: int):
|
|||
return HttpResponse(value)
|
||||
|
||||
|
||||
def get_updated_value(request, remaining_value: int, max_value: int | float) -> int:
|
||||
def get_updated_value(
|
||||
request, remaining_value: int | float, max_value: int | float
|
||||
) -> int:
|
||||
form_value = request.GET.get("value")
|
||||
if form_value == "ko":
|
||||
remaining_value = 0
|
||||
|
@ -232,7 +234,7 @@ def get_updated_value(request, remaining_value: int, max_value: int | float) ->
|
|||
remaining_value += form_value
|
||||
remaining_value = min([max_value, remaining_value])
|
||||
remaining_value = max([0, remaining_value])
|
||||
return remaining_value
|
||||
return int(remaining_value)
|
||||
|
||||
|
||||
@login_required
|
||||
|
|
Loading…
Reference in a new issue