The key can't be in app_settings anymore because it got migrated ...

This commit is contained in:
Alexandre Aubin 2020-10-30 00:04:40 +01:00
parent d4635f0eaa
commit 4e40f8b86a

View file

@ -1221,8 +1221,6 @@ def app_setting(app, key, value=None, delete=False):
# DELETE # DELETE
if delete: if delete:
if key in app_settings:
# If 'is_public' setting still exists, we interpret this as # If 'is_public' setting still exists, we interpret this as
# coming from a legacy app (because new apps should manage the # coming from a legacy app (because new apps should manage the
# is_public state themselves anymore...) # is_public state themselves anymore...)
@ -1233,7 +1231,7 @@ def app_setting(app, key, value=None, delete=False):
if 'is_public' in app_settings and 'visitors' in permissions[app + ".main"]['allowed']: if 'is_public' in app_settings and 'visitors' in permissions[app + ".main"]['allowed']:
if key.startswith('unprotected_') or key.startswith('skipped_'): if key.startswith('unprotected_') or key.startswith('skipped_'):
user_permission_update(app + ".main", remove="visitors") user_permission_update(app + ".main", remove="visitors")
else:
if permission: if permission:
permission_delete(permission_name) permission_delete(permission_name)