From cb7bfe7a669943e0a0cbaf9ce5cd8b92da22f0d1 Mon Sep 17 00:00:00 2001 From: Tagadda <36127788+Tagadda@users.noreply.github.com> Date: Thu, 20 Jan 2022 20:23:32 +0000 Subject: [PATCH] fix for bullseye --- src/utils/config.py | 1 - src/utils/legacy.py | 9 +++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/utils/config.py b/src/utils/config.py index f3c8f8177..837416ab5 100644 --- a/src/utils/config.py +++ b/src/utils/config.py @@ -1137,7 +1137,6 @@ class AppQuestion(Question): apps = app_list(full=True)["apps"] for _filter in self.filters: - print(_filter) apps = [ app for app in apps if _filter in app and app[_filter] ] self.choices = ["_none"] + [app['id'] for app in apps] diff --git a/src/utils/legacy.py b/src/utils/legacy.py index 7a8a4540a..3d42af20b 100644 --- a/src/utils/legacy.py +++ b/src/utils/legacy.py @@ -7,6 +7,7 @@ from moulinette.utils.filesystem import ( read_file, write_to_file, write_to_yaml, + write_to_json, read_yaml, ) @@ -92,17 +93,17 @@ def translate_legacy_default_app_in_ssowant_conf_json_persistent(): apps = app_list()['apps'] - if not any('domain_path' in app and app['domain_path'] in redirected_urls.values() for app in apps): + if not any(app.get('domain_path') in redirected_urls.values() for app in apps): return - for from_url, dest_url in redirected_urls.items(): + for from_url, dest_url in redirected_urls.copy().items(): # Not a root domain, skip if from_url.count('/') != 1 or not from_url.endswith('/'): continue for app in apps: - if 'domain_path' not in app or app['domain_path'] is not dest_url: + if app.get('domain_path') != dest_url: continue - domain_config_set(from_url.strip('/'), "feature.app.default", app['id']) + domain_config_set(from_url.strip('/'), "feature.app.default_app", app['id']) del redirected_urls[from_url] persistent["redirected_urls"] = redirected_urls