diff --git a/src/agenda_culturel/forms.py b/src/agenda_culturel/forms.py index dd8ccc7..95a9329 100644 --- a/src/agenda_culturel/forms.py +++ b/src/agenda_culturel/forms.py @@ -441,6 +441,8 @@ class EventForm(GroupFormMixin, ModelForm): if self.is_moderation_expert and self.cleaned_data.get("new_tags") is not None: self.cleaned_data["tags"] += self.cleaned_data.get("new_tags") + # if a new tag is introduced, we clean the corresponding cache + Tag.clear_cache() # when cloning an existing event, we need to copy the local image if ( @@ -517,6 +519,8 @@ class EventModerateForm(ModelForm): if self.is_moderation_expert and self.cleaned_data.get("new_tags") is not None: self.cleaned_data["tags"] += self.cleaned_data.get("new_tags") + # if a new tag is introduced, we clean the corresponding cache + Tag.clear_cache() self.cleaned_data["tags"] = list(set(self.cleaned_data["tags"]))