From 4b97f8c222e4dabddc8e510a8033c698189857cf Mon Sep 17 00:00:00 2001 From: Jean-Marie Favreau Date: Sat, 19 Oct 2024 19:10:56 +0200 Subject: [PATCH] =?UTF-8?q?On=20ne=20change=20la=20cat=C3=A9gorie=20que=20?= =?UTF-8?q?si=20elle=20n'est=20pas=20d=C3=A9finie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/agenda_culturel/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/agenda_culturel/models.py b/src/agenda_culturel/models.py index 09d11f2..ad45ac1 100644 --- a/src/agenda_culturel/models.py +++ b/src/agenda_culturel/models.py @@ -705,7 +705,8 @@ class Event(models.Model): self.exact_location = p break # try to detect category - CategorisationRule.apply_rules(self) + if not self.category: + CategorisationRule.apply_rules(self) def save(self, *args, **kwargs): self.prepare_save()