diff --git a/src/agenda_culturel/views.py b/src/agenda_culturel/views.py index 2049ea6..fa162c5 100644 --- a/src/agenda_culturel/views.py +++ b/src/agenda_culturel/views.py @@ -732,6 +732,10 @@ class ContactMessageCreateView(SuccessMessageMixin, CreateView): success_url = reverse_lazy("home") success_message = _("Your message has been sent successfully.") + def __init__(self, *args, **kwargs): + self.event = None + super().__init__(*args, **kwargs) + def get_form(self, form_class=None): if form_class is None: form_class = self.get_form_class()