diff --git a/src/agenda_culturel/views.py b/src/agenda_culturel/views.py index 2da0733..1822fd0 100644 --- a/src/agenda_culturel/views.py +++ b/src/agenda_culturel/views.py @@ -324,7 +324,7 @@ class EventUpdateView( return kwargs def get_success_message(self, cleaned_data): - txt = _(" A message has been sent to the person who proposed the event.") if hasattr(self, "with_msg") else "" + txt = _(" A message has been sent to the person who proposed the event.") if hasattr(self, "with_msg") and self.with_msg else "" return mark_safe(_('The event has been successfully modified.') + txt) @@ -374,7 +374,7 @@ class EventModerateView( form_class = EventModerateForm def get_success_message(self, cleaned_data): - txt = _(" A message has been sent to the person who proposed the event.") if hasattr(self, "with_msg") else "" + txt = _(" A message has been sent to the person who proposed the event.") if hasattr(self, "with_msg") and self.with_msg else "" return mark_safe(_('The event {} has been moderated with success.').format(self.object.get_absolute_url(), self.object.title) + txt)