Skip to content

Commit

Permalink
Merge pull request arachnys#616 from hartwork/fix-order-public-servic…
Browse files Browse the repository at this point in the history
…es-listing

Make public services listing list in case insensitive order
  • Loading branch information
dbuxton committed Apr 22, 2018
2 parents 2410964 + 82c64d3 commit 36d63a5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cabot/cabotapp/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from django.core.urlresolvers import reverse, reverse_lazy
from django.core.validators import URLValidator
from django.db import transaction
from django.db.models.functions import Lower
from django.http import HttpResponse, HttpResponseRedirect, JsonResponse
from django.shortcuts import redirect, render
from django.template import RequestContext, loader
Expand Down Expand Up @@ -822,7 +823,7 @@ def get_context_data(self, **kwargs):
context = super(ServicePublicListView, self).get_context_data(**kwargs)
context[self.context_object_name] = Service.objects\
.filter(is_public=True, alerts_enabled=True)\
.order_by('name').prefetch_related('status_checks')
.order_by(Lower('name')).prefetch_related('status_checks')
return context

class InstanceDetailView(LoginRequiredMixin, DetailView):
Expand Down

0 comments on commit 36d63a5

Please sign in to comment.