Commit 35805b81 authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Fix comparison of two possible NoneTypes

parent 48995332
......@@ -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