Umožněna editace souhlasu se zasíláním spamu
This commit is contained in:
parent
6ef3f5470c
commit
dfa665fe9e
1 changed files with 4 additions and 0 deletions
|
@ -111,6 +111,8 @@ def resitelEditView(request):
|
|||
prefill_1.update(prefill_3)
|
||||
if 'datum_narozeni' in prefill_1:
|
||||
prefill_1['datum_narozeni'] = str(prefill_1['datum_narozeni'])
|
||||
if 'datum_souhlasu_udaje' in prefill_1:
|
||||
prefill_1['spam'] = bool(prefill_1['datum_souhlasu_zasilani'])
|
||||
if 'rok_maturity' not in prefill_1 or prefill_1['rok_maturity'] < date.today().year:
|
||||
form = PoMaturiteProfileEditForm(initial=prefill_1)
|
||||
else:
|
||||
|
@ -143,6 +145,8 @@ def resitelEditView(request):
|
|||
## Změny v osobě s podmínkami
|
||||
if fcd.get('spam',False):
|
||||
osoba_edit.datum_souhlasu_zasilani = date.today()
|
||||
else:
|
||||
osoba_edit.datum_souhlasu_zasilani = None
|
||||
if fcd.get('stat','') in ('CZ','SK'):
|
||||
osoba_edit.stat = fcd['stat']
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue