Skip to content

Commit

Permalink
Alphabetize services in privacy table
Browse files Browse the repository at this point in the history
  • Loading branch information
cpfair committed May 23, 2016
1 parent 79edbfe commit bc083a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tapiriik/web/views/privacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ def privacy(request):

def user_services_sort(service):
if not request.user:
return 0
return (0, service["ID"])
if User.IsServiceConnected(request.user, service["ID"]):
return 0
return (0, service["ID"])
else:
return 1
return (1, service["ID"])

services_list = sorted(services.values(), key=user_services_sort)
return render(request, "privacy.html", {"services": services_list})

0 comments on commit bc083a9

Please sign in to comment.