From 958c063250535bd9d847490f6065a7f2965625f1 Mon Sep 17 00:00:00 2001 From: Wilson Gaturu Date: Mon, 24 Jul 2023 15:06:54 +0300 Subject: [PATCH] fixes datetime admin bug --- peachjam/models/core_document_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peachjam/models/core_document_model.py b/peachjam/models/core_document_model.py index e329c1e5a..b9baab545 100644 --- a/peachjam/models/core_document_model.py +++ b/peachjam/models/core_document_model.py @@ -425,7 +425,7 @@ def full_clean(self, *args, **kwargs): def clean(self): super().clean() - if self.date > datetime.date.today(): + if self.date and self.date > datetime.date.today(): raise ValidationError( {"date": _("You cannot set a future date for the document")} )