Compare commits

...

3 Commits

Author SHA1 Message Date
Jean-Marie Favreau 22c895b3a2 Fix erreur 500 si pas d'alias 2024-05-01 15:23:06 +02:00
Jean-Marie Favreau 94cc66e3f2 On n'affiche le lieu que s'il existe 2024-05-01 15:21:11 +02:00
Jean-Marie Favreau 22ae9a97cc On utilise le lieu exact s'il existe 2024-05-01 15:20:13 +02:00
2 changed files with 8 additions and 3 deletions

View File

@ -209,7 +209,10 @@ class Place(models.Model):
return Event.objects.filter(exact_location=self).count()
def match(self, event):
return event.location in self.aliases
if self.aliases:
return event.location in self.aliases
else:
return False
def associate_matching_events(self):
u_events = Event.objects.filter(exact_location__isnull=True)

View File

@ -12,8 +12,10 @@
</header>
<p class="subentry-search"></p>
{% if not no_location %}
{% picto_from_name "map-pin" %}
{% if event.location_hl %}{{ event.location_hl | safe }}{% else %}{% include "agenda_culturel/event-location-inc.html" with event=event %}{% endif %}</p>
{% if event.location or event.exact_location %}
{% picto_from_name "map-pin" %}
{% include "agenda_culturel/event-location-inc.html" with event=event %}
{% endif %}
{% endif %}
{% if event.has_recurrences %}
<p class="subentry-search">