Fix privacy page (fixes
@@ -2,6 +2,8 @@ from django.shortcuts import render
from tapiriik.services import Service
from tapiriik.settings import WITHDRAWN_SERVICES, SOFT_LAUNCH_SERVICES
from tapiriik.auth import User
+import itertools
+
def privacy(request):
OPTIN = "<span class=\"optin policy\">Opt-in</span>"
@@ -10,7 +12,7 @@ def privacy(request):
CACHED = "<span class=\"cached policy\">Cached</span>"
SEEBELOW = "See below"
- services = dict([[x.ID, {"DisplayName": x.DisplayName, "ID": x.ID}] for x in Service.List() if x.ID not in WITHDRAWN_SERVICES])
+ services = dict([[x.ID, {"DisplayName": x.DisplayName, "ID": x.ID}] for x in Service.List()])
services["garminconnect"].update({"email": OPTIN, "password": OPTIN, "tokens": NO, "metadata": YES, "data":NO})
services["strava"].update({"email": NO, "password": NO, "tokens": YES, "metadata": YES, "data":NO})
@@ -33,7 +35,7 @@ def privacy(request):
services["singletracker"].update({"email": NO, "password": NO, "tokens": YES, "metadata": YES, "data":NO})
services["aerobia"].update({"email": OPTIN, "password": OPTIN, "tokens": NO, "metadata": YES, "data":NO})
- for svc_id in SOFT_LAUNCH_SERVICES:
+ for svc_id in itertools.chain(WITHDRAWN_SERVICES, SOFT_LAUNCH_SERVICES):
if svc_id in services:
del services[svc_id]
