Correction soumission anonyme

Fix #239
This commit is contained in:
Jean-Marie Favreau 2024-12-05 18:16:31 +01:00
parent 084b3dfb25
commit 874c1779f8

View File

@ -10,7 +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.contrib.auth.models import User
from django.contrib.auth.models import User, AnonymousUser
import emoji
import hashlib
@ -935,6 +935,9 @@ class Event(models.Model):
self.no_modification_date_changed = True
def set_processing_user(self, user):
if user.is_anonymous:
self.processing_user = None
else:
self.processing_user = user
def set_in_moderation_process(self):