From 0c6bae237fc5452fb9d143b18b6f9c280fe9bd39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Mon, 31 Jan 2022 19:34:06 +0100 Subject: [PATCH] =?UTF-8?q?Neaktualizovat=20datum=20souhlasu=20se=20spamem?= =?UTF-8?q?=20p=C5=99i=20=C3=BAprav=C4=9B=20=C3=BAdaj=C5=AF.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- personalni/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/personalni/views.py b/personalni/views.py index e7ff0e88..03cbf6bf 100644 --- a/personalni/views.py +++ b/personalni/views.py @@ -144,7 +144,8 @@ def resitelEditView(request): osoba_edit.datum_narozeni = fcd['datum_narozeni'] ## Změny v osobě s podmínkami if fcd.get('spam',False): - osoba_edit.datum_souhlasu_zasilani = date.today() + if not osoba_edit.datum_souhlasu_zasilani: + osoba_edit.datum_souhlasu_zasilani = date.today() else: osoba_edit.datum_souhlasu_zasilani = None if fcd.get('stat','') in ('CZ','SK'):