On reset le cache en cas d'ajout d'un nouveau tag
This commit is contained in:
parent
7d5b47e7ab
commit
74fe6cb86f
@ -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"]))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user