mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Optimized filter functions
This commit is contained in:
@@ -124,7 +124,7 @@ class FilterModule(object):
|
||||
|
||||
# Enable loading via ancestors
|
||||
if (
|
||||
self.is_feature_enabled(applications, 'portfolio_iframe', application_id)
|
||||
self.is_feature_enabled(applications, 'port-ui-desktop', application_id)
|
||||
and directive == 'frame-ancestors'
|
||||
):
|
||||
domain = domains.get('web-app-port-ui')[0]
|
||||
|
@@ -72,14 +72,12 @@ def get_app_conf(applications, application_id, config_path, strict=True):
|
||||
try:
|
||||
obj = applications[application_id]
|
||||
except KeyError:
|
||||
if strict:
|
||||
raise AppConfigKeyError(
|
||||
f"Application ID '{application_id}' not found in applications dict.\n"
|
||||
f"path_trace: {path_trace}\n"
|
||||
f"applications keys: {list(applications.keys())}\n"
|
||||
f"config_path: {config_path}"
|
||||
)
|
||||
return False
|
||||
raise AppConfigKeyError(
|
||||
f"Application ID '{application_id}' not found in applications dict.\n"
|
||||
f"path_trace: {path_trace}\n"
|
||||
f"applications keys: {list(applications.keys())}\n"
|
||||
f"config_path: {config_path}"
|
||||
)
|
||||
|
||||
for part in config_path.split("."):
|
||||
path_trace.append(part)
|
||||
|
Reference in New Issue
Block a user