parent
d770cf23f0
commit
63d3cb76ea
@ -10,6 +10,7 @@ from colorfield.fields import ColorField
|
||||
from django_ckeditor_5.fields import CKEditor5Field
|
||||
from urllib.parse import urlparse
|
||||
from django.core.cache import cache
|
||||
from django.core.cache.utils import make_template_fragment_key
|
||||
from django.contrib.auth.models import User, AnonymousUser
|
||||
import emoji
|
||||
|
||||
@ -1156,6 +1157,12 @@ class Event(models.Model):
|
||||
# first save the current object
|
||||
super().save(*args, **kwargs)
|
||||
|
||||
# clear cache
|
||||
for is_auth in [False, True]:
|
||||
key = make_template_fragment_key("event_body", [is_auth, self])
|
||||
cache.delete(key)
|
||||
logger.warning("on passe par le save")
|
||||
|
||||
# then if its a clone, update the representative
|
||||
if clone:
|
||||
self.other_versions.representative = self
|
||||
|
Loading…
Reference in New Issue
Block a user