1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-21 09:58:23 +02:00

Validate registrations, closes #14, #18, #19

This commit is contained in:
Yohann D'ANELLO
2020-04-05 09:09:21 +02:00
parent b1cd46bf7d
commit fbc25240e6
6 changed files with 204 additions and 50 deletions

View File

@ -13,7 +13,7 @@ class AmountInput(NumberInput):
template_name = "note/amount_input.html"
def format_value(self, value):
return None if value is None or value == "" else "{:.02f}".format(value / 100, )
return None if value is None or value == "" else "{:.02f}".format(int(value) / 100, )
def value_from_datadict(self, data, files, name):
val = super().value_from_datadict(data, files, name)