From 8b6627087bac472ac627715891434be2820559a0 Mon Sep 17 00:00:00 2001 From: Jean-Marie Favreau Date: Wed, 30 Oct 2024 14:12:53 +0100 Subject: [PATCH] =?UTF-8?q?On=20renomme=20pour=20=C3=AAtre=20plus=20explic?= =?UTF-8?q?ite?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/agenda_culturel/models.py | 2 +- src/agenda_culturel/views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/agenda_culturel/models.py b/src/agenda_culturel/models.py index b7d5708..92c593d 100644 --- a/src/agenda_culturel/models.py +++ b/src/agenda_culturel/models.py @@ -1641,7 +1641,7 @@ class CategorisationRule(models.Model): return 0 - def match_rules(event): + def get_category_from_rules(event): rules = CategorisationRule.objects.all().order_by("weight", "pk") for rule in rules: diff --git a/src/agenda_culturel/views.py b/src/agenda_culturel/views.py index 6cd86a2..9a20ccd 100644 --- a/src/agenda_culturel/views.py +++ b/src/agenda_culturel/views.py @@ -1731,7 +1731,7 @@ def apply_categorisation_rules(request): # first we check if events are not correctly categorised to_categorise = [] for e in Event.objects.filter(start_day__gte=datetime.now()).exclude(category=Category.get_default_category_id()): - c = CategorisationRule.match_rules(e) + c = CategorisationRule.get_category_from_rules(e) if c and c != e.category: to_categorise.append((e, c))