fix un cas rare de valeur non définie

This commit is contained in:
Jean-Marie Favreau 2024-11-11 16:15:35 +01:00
parent 4541366af1
commit 54e3af00cd

View File

@ -387,7 +387,7 @@ class Place(models.Model):
return Event.objects.filter(start_day__gte=datetime.now()).filter(exact_location=self).count() return Event.objects.filter(start_day__gte=datetime.now()).filter(exact_location=self).count()
def match(self, event): def match(self, event):
if self.aliases: if self.aliases and event.location:
return event.location.strip() in self.aliases return event.location.strip() in self.aliases
else: else:
return False return False