deal with redirects without slugs [wtf?]

This commit is contained in:
Laura Klünder 2024-12-15 14:12:57 +00:00
parent 967eb36c6c
commit b252cd8b86

View file

@ -112,7 +112,7 @@ class Location(LocationSlug, AccessRestrictionMixin, TitledMixin, models.Model):
@property @property
def add_search(self): def add_search(self):
return ' '.join(( return ' '.join((
*(redirect.effective_slug for redirect in self.redirects.all()), *(redirect.slug for redirect in self.redirects.all() if redirect.slug),
*self.other_titles, *self.other_titles,
)) ))