parent
d770cf23f0
commit
63d3cb76ea
@ -10,6 +10,7 @@ from colorfield.fields import ColorField
|
|||||||
from django_ckeditor_5.fields import CKEditor5Field
|
from django_ckeditor_5.fields import CKEditor5Field
|
||||||
from urllib.parse import urlparse
|
from urllib.parse import urlparse
|
||||||
from django.core.cache import cache
|
from django.core.cache import cache
|
||||||
|
from django.core.cache.utils import make_template_fragment_key
|
||||||
from django.contrib.auth.models import User, AnonymousUser
|
from django.contrib.auth.models import User, AnonymousUser
|
||||||
import emoji
|
import emoji
|
||||||
|
|
||||||
@ -1156,6 +1157,12 @@ class Event(models.Model):
|
|||||||
# first save the current object
|
# first save the current object
|
||||||
super().save(*args, **kwargs)
|
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
|
# then if its a clone, update the representative
|
||||||
if clone:
|
if clone:
|
||||||
self.other_versions.representative = self
|
self.other_versions.representative = self
|
||||||
|
Loading…
x
Reference in New Issue
Block a user