mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
fix for bullseye
This commit is contained in:
parent
30983a4efd
commit
cb7bfe7a66
2 changed files with 5 additions and 5 deletions
|
@ -1137,7 +1137,6 @@ class AppQuestion(Question):
|
||||||
|
|
||||||
apps = app_list(full=True)["apps"]
|
apps = app_list(full=True)["apps"]
|
||||||
for _filter in self.filters:
|
for _filter in self.filters:
|
||||||
print(_filter)
|
|
||||||
apps = [ app for app in apps if _filter in app and app[_filter] ]
|
apps = [ app for app in apps if _filter in app and app[_filter] ]
|
||||||
|
|
||||||
self.choices = ["_none"] + [app['id'] for app in apps]
|
self.choices = ["_none"] + [app['id'] for app in apps]
|
||||||
|
|
|
@ -7,6 +7,7 @@ from moulinette.utils.filesystem import (
|
||||||
read_file,
|
read_file,
|
||||||
write_to_file,
|
write_to_file,
|
||||||
write_to_yaml,
|
write_to_yaml,
|
||||||
|
write_to_json,
|
||||||
read_yaml,
|
read_yaml,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -92,17 +93,17 @@ def translate_legacy_default_app_in_ssowant_conf_json_persistent():
|
||||||
|
|
||||||
apps = app_list()['apps']
|
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
|
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
|
# Not a root domain, skip
|
||||||
if from_url.count('/') != 1 or not from_url.endswith('/'):
|
if from_url.count('/') != 1 or not from_url.endswith('/'):
|
||||||
continue
|
continue
|
||||||
for app in apps:
|
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
|
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]
|
del redirected_urls[from_url]
|
||||||
|
|
||||||
persistent["redirected_urls"] = redirected_urls
|
persistent["redirected_urls"] = redirected_urls
|
||||||
|
|
Loading…
Add table
Reference in a new issue