Consolidation en cas de catégories dupliquées

This commit is contained in:
Jean-Marie Favreau 2024-11-09 14:38:39 +01:00
parent 1b59ce34f2
commit 7f79b7797a

View File

@ -1708,7 +1708,7 @@ def apply_categorisation_rules(request):
nb = 0
for epk, c in form.get_validated():
e = Event.objects.get(pk=epk)
cat = Category.objects.get(name=c)
cat = Category.objects.filter(name=c).first()
e.category = cat
e.save()
nb += 1