On renomme pour être plus explicite

This commit is contained in:
Jean-Marie Favreau 2024-10-30 14:12:53 +01:00
parent b80f1c038f
commit 8b6627087b
2 changed files with 2 additions and 2 deletions

View File

@ -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:

View File

@ -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))