Skip to content

Commit

Permalink
Fix sentry:CONCREXIT-1FW (#3824)
Browse files Browse the repository at this point in the history
* Fix sentry:CONCREXIT-1FW

* Fix validation error in NewsletterImportEventForm
  • Loading branch information
T8902 authored Nov 4, 2024
1 parent 3566842 commit 11e00d7
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions website/newsletters/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,17 @@ def clean(self):
_("This field is required if you specify an end date."),
)

if event_start is not None and (event_start > event_end):
if (
event_start is not None
and event_end is not None
and (event_start > event_end)
):
self.add_error("event_end", _("Range must end after it starts."))
if registration_start is not None and (registration_start > registration_end):
if (
registration_start is not None
and registration_end is not None
and (registration_start > registration_end)
):
self.add_error("registration_end", _("Range must end after it starts."))

if event_start is None and registration_start is None:
Expand Down

0 comments on commit 11e00d7

Please sign in to comment.