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 8bc89c8
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions tapiriik/web/views/privacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,5 @@ def privacy(request):
if svc_id in services:
del services[svc_id]

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

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

0 comments on commit 8bc89c8

Please sign in to comment.