Browse Source

Fix error with filtered topic tag including space

This isn't great, but will fix an error that's actively occurring when
someone filters to a single tag (tag= query var) and also has a filtered
topic tag with a space in it.
merge-requests/126/merge
Deimos 4 years ago
parent
commit
9a82f2c640
  1. 4
      tildes/tildes/views/topic.py

4
tildes/tildes/views/topic.py

@ -221,7 +221,9 @@ def get_group_topics( # noqa
# for example, if viewing "ask.survey", don't filter "ask.survey" or "ask" # for example, if viewing "ask.survey", don't filter "ask.survey" or "ask"
if tag: if tag:
filtered_topic_tags = [ filtered_topic_tags = [
ft for ft in filtered_topic_tags if not tag.descendant_of(ft)
ft
for ft in filtered_topic_tags
if not tag.descendant_of(ft.replace(" ", "_"))
] ]
query = query.filter( query = query.filter(

Loading…
Cancel
Save