From 9e6f608c91721710700bd891bad151892175b8e5 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 21 Oct 2021 20:05:38 +0100 Subject: [PATCH] Checking for enabled lists --- webapp_profile.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/webapp_profile.py b/webapp_profile.py index 6b2af9093..f36b28e73 100644 --- a/webapp_profile.py +++ b/webapp_profile.py @@ -1677,18 +1677,15 @@ def _htmlEditProfileFiltering(baseDir: str, nickname: str, domain: str, 200, '', False) CWlistsStr = '' - if listsEnabled: - print('CWlistsStr 0: ' + str(CWlists)) - for name, item in CWlists.items(): - print('CWlistsStr: ' + name) - variableName = 'list' + name.replace(' ', '').replace("'", '') + for name, item in CWlists.items(): + variableName = 'list' + name.replace(' ', '').replace("'", '') + listIsEnabled = False + if listsEnabled: if name in listsEnabled: listIsEnabled = True - else: - listIsEnabled = False - if translate.get(name): - name = translate[name] - CWlistsStr += editCheckBox(name, variableName, listIsEnabled) + if translate.get(name): + name = translate[name] + CWlistsStr += editCheckBox(name, variableName, listIsEnabled) if CWlistsStr: idx = 'Add content warnings for the following sites' editProfileForm += \