Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make tag browsing case-insensitive and unique #1807

Merged
merged 5 commits into from
Feb 11, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
for list comprehension simplification
quimmrc committed Jan 21, 2025
commit e3022708865cddae3676db6cc85e18d98d19b7c6
2 changes: 1 addition & 1 deletion tags/views.py
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@ def tags(request, multiple_tags=None):
else:
multiple_tags = []
#Make all tags lower-cased and unique to get a case-insensitive search filter and shortened browse url
multiple_tags = sorted(set([x.lower() for x in multiple_tags if x]))
multiple_tags = sorted({x.lower() for x in multiple_tags if x})
if multiple_tags:
# We re-write tags as query filter and redirect
search_filter = "+".join('tag:"' + tag + '"' for tag in multiple_tags)