From 1a4a7390f2f79724e3ae7d0d1961e7596b40d862 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Thu, 2 Apr 2026 21:22:55 +0000 Subject: [PATCH] fix adding events --- core/__pycache__/models.cpython-311.pyc | Bin 3723 -> 3785 bytes core/models.py | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/core/__pycache__/models.cpython-311.pyc b/core/__pycache__/models.cpython-311.pyc index 73573bf954322639ea89faf12bb7d7bdcc2ab94f..25fd7c167aee31970cff6e5f2e440bf10cfe9e99 100644 GIT binary patch delta 190 zcmeB{Jt@n(oR^o20SG?cJ(p>|k@pG<*E%3?D&us962{3BIV2`CvlKoFgas&$v*UgeduH@k=C delta 130 zcmX>p+bzqxoR^o20SF#8pUY(4$a{r_s|(1R$~c{&gmE%ItHfkxRwI!bhAd`~A`r-C z1d&C8lT%sMCQoK{WK#xlg(u%)wNnD@w3;At diff --git a/core/models.py b/core/models.py index d2892a0..a095a74 100644 --- a/core/models.py +++ b/core/models.py @@ -24,7 +24,7 @@ class Event(models.Model): def clean(self): super().clean() - if self.end <= self.start: + if self.start is not None and self.end is not None and self.end <= self.start: raise ValidationError({'end': 'End time must be after the start time.'}) def save(self, *args, **kwargs):