Commit 3c97bcdf authored by Thom Wiggers's avatar Thom Wiggers 📐
Browse files

Merge branch 'fix/newsletter-unorderable-crash' into 'master'

Fix comparison of two possible NoneTypes

See merge request !310
parents 48995332 35805b81
......@@ -130,7 +130,9 @@ class NewsletterEvent(NewsletterContent):
def clean(self):
if self.end_datetime < self.start_datetime:
if (self.end_datetime is not None and
self.start_datetime is not None and
self.end_datetime < self.start_datetime):
raise ValidationError({
'end_datetime': _("Can't have an event travel back in time")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment