Fix data narození v osobních údajích (prefill a ukládání)
This commit is contained in:
parent
4b9168c918
commit
82627c2be3
1 changed files with 3 additions and 0 deletions
|
@ -1100,6 +1100,8 @@ def resitelEditView(request):
|
||||||
prefill_1.update(prefill_2)
|
prefill_1.update(prefill_2)
|
||||||
prefill_3=model_to_dict(osoba_edit)
|
prefill_3=model_to_dict(osoba_edit)
|
||||||
prefill_1.update(prefill_3)
|
prefill_1.update(prefill_3)
|
||||||
|
if 'datum_narozeni' in prefill_1:
|
||||||
|
prefill_1['datum_narozeni'] = str(prefill_1['datum_narozeni'])
|
||||||
if resitel_edit and resitel_edit.rok_maturity < date.today().year:
|
if resitel_edit and resitel_edit.rok_maturity < date.today().year:
|
||||||
form = ProfileEditFormPoMat(initial=prefill_1)
|
form = ProfileEditFormPoMat(initial=prefill_1)
|
||||||
else:
|
else:
|
||||||
|
@ -1121,6 +1123,7 @@ def resitelEditView(request):
|
||||||
osoba_edit.ulice = fcd['ulice']
|
osoba_edit.ulice = fcd['ulice']
|
||||||
osoba_edit.mesto = fcd['mesto']
|
osoba_edit.mesto = fcd['mesto']
|
||||||
osoba_edit.psc = fcd['psc']
|
osoba_edit.psc = fcd['psc']
|
||||||
|
osoba_edit.datum_narozeni = fcd['datum_narozeni']
|
||||||
## Změny v osobě s podmínkami
|
## Změny v osobě s podmínkami
|
||||||
if fcd.get('spam',False):
|
if fcd.get('spam',False):
|
||||||
osoba_edit.datum_souhlasu_zasilani = date.today()
|
osoba_edit.datum_souhlasu_zasilani = date.today()
|
||||||
|
|
Loading…
Reference in a new issue