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

Change rulesets listing sort behavior to case insensitive #305

Merged
merged 1 commit into from Apr 7, 2022

Conversation

HelloYeew
Copy link
Member

@HelloYeew HelloYeew commented Apr 7, 2022

At first the sort behavior using Django's sort that's mean the object that use capital letter will come first. This PR change the behavior of how it sort by just lower it first before let it sort.

# Before
'rulesets': make_listing_view(Ruleset.objects.filter(hidden=False, archive=False).order_by('name')),
# After
'rulesets': make_listing_view(Ruleset.objects.filter(hidden=False, archive=False).order_by(Lower('name'))),

At first the sort behavior using Django's sort that's mean the object that use capital letter will come first. This PR change the behavior of how it sort by just lower it first before let it sort
@HelloYeew HelloYeew merged commit e9170d3 into Rurusetto:new-website Apr 7, 2022
@HelloYeew HelloYeew deleted the fix-sort-no-case branch April 7, 2022 06:58
@HelloYeew HelloYeew changed the title Change the sort behavior to case insensitive Change rulesets listing sort behavior to case insensitive Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant