On assure qu'à l'import l'événement ait toujours une catégorie

This commit is contained in:
Jean-Marie Favreau 2024-10-16 11:16:26 +02:00
parent 2253fc50b4
commit 81ae863b45

View File

@ -725,6 +725,8 @@ class Event(models.Model):
)
except Category.DoesNotExist:
event_structure["category"] = Category.get_default_category()
else:
event_structure["category"] = Category.get_default_category()
if "published" in event_structure and event_structure["published"] is not None:
if event_structure["published"]: