Fix character creation

This commit is contained in:
Gabriel Augendre 2022-11-10 11:40:51 +01:00
parent 6158002796
commit c43c33f06f
3 changed files with 2 additions and 2 deletions

View file

@ -80,7 +80,6 @@ class CharacterCreateForm(forms.ModelForm):
"armor",
"shield",
"defense_misc",
"initiative_misc",
"equipment",
"money_pp",
"money_po",

View file

@ -318,7 +318,7 @@ class Character(models.Model):
@property
def luck_points_max(self) -> int:
return 3 + self.modifier_charisma
return max([3 + self.modifier_charisma, 0])
@property
def health_remaining_percent(self) -> float:

View file

@ -6,6 +6,7 @@
{% block content %}
<h1>Création de personnage</h1>
<form action="" method="post">
{% bootstrap_form_errors form %}
{% csrf_token %}
<h2>Identité</h2>
{% bootstrap_field form.name %}